-
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-7141: ConsumerGroupCommand should describe group assignment eve… #5356
Conversation
…n with no offsets committed. https://issues.apache.org/jira/browse/KAFKA-7141 Currently, if a consumer group never commits offsets, ConsumerGroupCommand cannot describe it at all even if the member assignment is valid. Instead, the tool should be able to describe the group information showing empty current_offset and LAG.
…n-commit-offset groups
@vahidhashemian Please review this patch. Thanks. |
retest it please. |
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.
@huxihx thanks for making this improvement. I just had a minor comment inline. Otherwise, LGTM.
abstract class AbstractConsumerRunnable(broker: String, groupId: String) extends Runnable { | ||
val props = new Properties | ||
abstract class AbstractConsumerRunnable(broker: String, groupId: String, customPropsOpt: Option[Properties] = None) extends Runnable { | ||
val props = if (customPropsOpt.isDefined) new Properties(customPropsOpt.get) else new Properties |
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.
Wouldn't it be better to move this line after configure(props)
below so we also provide a way to override the default configs? In other words, this line would remain unchanged, and after configure(props)
we add
if (customPropsOpt.isDefined)
props.putAll(customPropsOpt.get)
@vahidhashemian Thanks for the comments, please review again. |
LGTM, thanks for addressing my 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.
+1
@hachikuji Could you take some time to review this patch? Thanks. |
With Vahid's previous KIP, I think the intention is that the default behavior of |
I think this PR fixes the situation where consumers have joined the group but have not committed any offset yet. Current implementation does not report any rows until they commit offsets, which I think does not provide a good user experience. It seems to me that this PR still follows the definition of
Please advise if I'm missing something. |
Ok, that makes sense. |
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.
Left a trivial comment, but otherwise LGTM. Thanks!
val props = new Properties | ||
configure(props) | ||
if (customPropsOpt.isDefined) |
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.
nit: use foreach
@hachikuji Thanks for the comments. Please review again. |
retest it please. |
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
retest this please |
Thanks @huxihx. I will merge in the morning after the build finishes. |
retest this please |
1 similar comment
retest this please |
FAILURE |
@huxihx The build failure on jdk10 seems deterministic. Can you look into it? |
@hachikuji Seems it hit a known Scala bug opened by Ijuma (scala/bug#10418). I will take care of it. |
retest this please |
@huxihx Thanks for fixing the issue. Merged to trunk. |
…n with no offsets committed.
https://issues.apache.org/jira/browse/KAFKA-7141
Currently, if a consumer group never commits offsets, ConsumerGroupCommand cannot describe it at all even if the member assignment is valid. Instead, the tool should be able to describe the group information showing empty current_offset and LAG.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)