-
Notifications
You must be signed in to change notification settings - Fork 14.9k
MINOR: Fix TestLinearWriteSpeed class #20349
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
Conversation
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/log/TestLinearWriteSpeed.java
Outdated
Show resolved
Hide resolved
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/log/TestLinearWriteSpeed.java
Outdated
Show resolved
Hide resolved
chia7712
left a comment
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.
@see-quick Thanks for finding this. I also noticed another bug—could you please fix it in this PR?
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/log/TestLinearWriteSpeed.java
Outdated
Show resolved
Hide resolved
Signed-off-by: see-quick <maros.orsak159@gmail.com>
| private static void setupCompression(CompressionType compressionType, | ||
| Compression.Builder<? extends Compression> compressionBuilder, | ||
| int compressionLevel) { | ||
| Integer compressionLevel) { |
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.
Perhaps we could call setupCompression only if compressionLevel is defined. WDYT?
if (compressionLevel != null) setupCompression(compressionType, compressionBuilder, compressionLevel);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.
Sure, that works too — thanks 👍
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 change is no longer required, right?
Signed-off-by: see-quick <maros.orsak159@gmail.com>
m1a2st
left a comment
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 also update the message-size argument description? Since it has a default value and users cannot manually set it to null, I think the REQUIRED: should be removed.
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 same applies to the files argument. In this case, the user input for this argument is checked at line 129 in checkRequiredArgs. However, if the user does not provide a value and the default value is used, it will fail. I think we should update the description and remove it from the validator.
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Thanks, updated. |
|
the mode |
This PR fixes a problem related to
TestLinearWriteSpeed. During mywork on KIP-780, I discovered that benchmarks for
TestLinearWriteSpeeddo not account for compression algorithms. It always uses
Compression.NONEwhen creating records. The problem was introduced inthis PR [1].
[1] - #17736
Reviewers: Ken Huang s7133700@gmail.com, Mickael Maison
mickael.maison@gmail.com, Chia-Ping Tsai chia7712@gmail.com