-
Notifications
You must be signed in to change notification settings - Fork 14.6k
KAFKA-19624: Improving consistency of command-line arguments for consumer performance tests #20385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
…umer performance tests
@AndrewJSchofield can you please review this? |
ping @aheev, could you please fix the conflicts? |
# Conflicts: # tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java # tools/src/test/java/org/apache/kafka/tools/ConsumerPerformanceTest.java
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch, left some comments below.
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java
Show resolved
Hide resolved
This test seems to be flaky. It succeeds on my machine and fails sometimes. Also the changes are not even related to the test Just tested. Same issue on trunk too |
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this patch, some comments left
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Please add some tests for the variation combinations of new/old options to make sure the rules in the KIP are correctly implemented.
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java
Outdated
Show resolved
Hide resolved
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java
Show resolved
Hide resolved
…nd `messages` traces from the tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, some minor comments.
tools/src/main/java/org/apache/kafka/tools/ShareConsumerPerformance.java
Outdated
Show resolved
Hide resolved
@@ -136,7 +174,9 @@ public void testConfigWithoutTopicAndInclude() { | |||
|
|||
@Test | |||
public void testClientIdOverride() throws IOException { | |||
File tempFile = Files.createFile(tempDir.resolve("test_consumer_config.conf")).toFile(); | |||
Path configPath = tempDir.resolve("test_consumer_config.conf"); | |||
Files.deleteIfExists(configPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required, tempDir will be cleanup automatically after junit test finished.
Same thing in other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I was testing, a test ended abruptly and caused FileAlreadyExists
exceptions on next runs. Hence, I have added this code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, we have multiple test files with the same name. We could give them distinct names—for example, by adding a random suffix or simply choosing different names. This is just my personal nit though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the file names to test_name_test_class.conf
tools/src/test/java/org/apache/kafka/tools/ConsumerPerformanceTest.java
Outdated
Show resolved
Hide resolved
tools/src/test/java/org/apache/kafka/tools/ShareConsumerPerformanceTest.java
Outdated
Show resolved
Hide resolved
tools/src/test/java/org/apache/kafka/tools/ShareConsumerPerformanceTest.java
Show resolved
Hide resolved
tools/src/test/java/org/apache/kafka/tools/ShareConsumerPerformanceTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
tools/src/test/java/org/apache/kafka/tools/ConsumerPerformanceTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, LGTM. Could you run the e2e test and share the results?
resolves https://issues.apache.org/jira/browse/KAFKA-19624
Reviewers: @brandboat, @AndrewJSchofield, @m1a2st