yunchipang commented on code in PR #20396:
URL: https://github.com/apache/kafka/pull/20396#discussion_r2311337890
##########
tools/src/main/java/org/apache/kafka/tools/LogCompactionTester.java:
##########
@@ -395,12 +407,29 @@ private static void require(boolean requirement, String
message) {
}
private static Path produceMessages(String brokerUrl, Set<String> topics,
long messages,
- String compressionType, int dups, int
percentDeletes) throws IOException {
- Map<String, Object> producerProps = Map.of(
- ProducerConfig.MAX_BLOCK_MS_CONFIG,
String.valueOf(Long.MAX_VALUE),
- ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, brokerUrl,
- ProducerConfig.COMPRESSION_TYPE_CONFIG, compressionType
- );
+ CompressionType compressionType,
Integer compressionLevel,
+ int dups, int percentDeletes) throws
IOException {
+ Map<String, Object> producerProps = new HashMap<>();
+ producerProps.put(ProducerConfig.MAX_BLOCK_MS_CONFIG,
String.valueOf(Long.MAX_VALUE));
+ producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, brokerUrl);
+ producerProps.put(ProducerConfig.COMPRESSION_TYPE_CONFIG,
compressionType.name);
+
+ if (compressionLevel != null) {
+ switch (compressionType.name.toLowerCase(Locale.ROOT)) {
Review Comment:
fixed. thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]