-
Notifications
You must be signed in to change notification settings - Fork 14.5k
KAFKA-19306: Migrate LogCompactionTester to tools module #19905
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?
KAFKA-19306: Migrate LogCompactionTester to tools module #19905
Conversation
A label of 'needs-attention' was automatically added to this PR in order to raise the |
A label of 'needs-attention' was automatically added to this PR in order to raise the |
c68abe6
to
c0ec2b9
Compare
715b34a
to
bba76b2
Compare
A label of 'needs-attention' was automatically added to this PR in order to raise the |
* Then we compare the final message in both logs for each key. If this final message is not the same for all keys we | ||
* print an error and exit with exit code 1, otherwise we print the size reduction and exit with exit code 0. | ||
*/ | ||
public class LogCompactionTester { |
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.
the e2e don't include the test jar of tools
module, which results in no class error when running log_compaction_test.py
. Given that ClientCompatibilityTest
is in production code, it should be fine to move LogCompactionTester
to production code also.
c1fbd3a
to
267ac01
Compare
@chia7712 can you have a look? thanks! |
@yunchipang Please merge trunk and fix the build error. |
…e-LogCompactionTester-to-tools-module
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.
@yunchipang thanks for this patch. It seems to me splitting the scala file to 4 java files are unnecessary.
import java.util.Spliterators; | ||
import java.util.function.Consumer; | ||
|
||
public class TestRecordUtils { |
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.
Could you please consider merging all helpers to LogCompactionTester
?
*/ | ||
package org.apache.kafka.tools; | ||
|
||
public class TestRecord { |
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.
Please use record
type to streamline it and then inline it to LogCompactionTester
import joptsimple.OptionParser; | ||
import joptsimple.OptionSpec; | ||
|
||
public class LogCompactionTesterOptions { |
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.
ditto. Move it to LogCompactionTesterOptions
and then rename it to Options
jira: KAFKA-19306
log
result