-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
KAFKA-5772 Improve Util classes #3370
Conversation
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
@rhauch do you mind taking a look? Or do I need to also have a JIRA for this improvement? |
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!
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.
We still need a JIRA issue, and the title of this PR should start with that issue number per the contributors guide. Other than that, the code changes look great.
@rhauch Thanks Randall 👍 I've created a JIRA and update the tilte of the PR 😃 |
@matzew, the Apache JIRA should automatically update with a reference to this PR, but I don't see that happening. Perhaps remove the " -" just after the issue number in the PR title? |
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!
Actually, on second thought I'm not sure whether these utility methods are considered part of the public API, and if so whether a KIP would be required. The Apache Kafka project are very strict about ensuring backward compatibility, and technically removing the constructor for these classes breaks backward compatibility. Need advice from one of the committers, such as @hachikuji or @ijuma. |
These are class are internal. |
@rhauch is there still interest in merging this? Or should I just close it ? |
@ijuma any reason not to approve and merge this? |
retest this please. |
@@ -26,6 +26,9 @@ | |||
import org.apache.kafka.common.resource.ResourceType; | |||
|
|||
class RequestUtils { |
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.
Is there a reason why this one is not final?
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.
@ijuma there was no particular reason, added final
keyword here to
retest this please |
One issue with |
633fa03
to
63a1b25
Compare
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'm going to approve this on a technical basis: the PR is simple and minimal. I'll leave to @ijuma to decide whether it's a desirable change.
should I close it at this point? Or worth to merge ?
…On Thu, Sep 14, 2017 at 11:43 PM, Randall Hauch ***@***.***> wrote:
***@***.**** approved this pull request.
I'm going to approve this on a technical basis: the PR is simple and
minimal. I'll leave to @ijuma <https://github.com/ijuma> to decide
whether it's a desirable change.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3370 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJnzqMKSOIpyfNS5L6z1xVfhEnjWRsnks5siZ3mgaJpZM4N-LTL>
.
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
twitter: http://twitter.com/mwessendorf
|
63a1b25
to
2dc6a11
Compare
@ijuma should I close it or will it be merged ? :-) |
Thanks for the patch. LGTM. |
Thanks 😸 |
Done for https://issues.apache.org/jira/browse/KAFKA-5772
Utils with static methods should not be instantiated, hence marking the classes
final
and adding aprivate
constructor.this is consistent w/ some of the Util classes, such as
ByteUtils
, see:kafka/clients/src/main/java/org/apache/kafka/common/utils/ByteUtils.java
Lines 29 to 31 in d345d53