Skip to content

KAFKA-9353: Add groupInstanceId to DescribeGroup for better visibility#7886

Merged
hachikuji merged 1 commit intoapache:trunkfrom
dengziming:describe-static-member
May 27, 2020
Merged

KAFKA-9353: Add groupInstanceId to DescribeGroup for better visibility#7886
hachikuji merged 1 commit intoapache:trunkfrom
dengziming:describe-static-member

Conversation

@dengziming
Copy link
Copy Markdown
Member

@dengziming dengziming commented Jan 2, 2020

Kafka-8538(#6957) has already added group.instance.id to MemberDescription but didn't print it, so we just print it.
before the change, the describe command print as follows:

GROUP           CONSUMER-ID                                                  HOST            CLIENT-ID               #PARTITIONS     
DemoConsumer    consumer-DemoConsumer-2-89251f12-f0ae-4dc1-a118-bda49f2a6e86 /127.0.0.1      consumer-DemoConsumer-2 0               
DemoConsumer    consumer-DemoConsumer-1-72221c6b-f3d9-4c68-96db-ffffa12ddf93 /127.0.0.1      consumer-DemoConsumer-1 1               

after the change, the describe command print as follows:

GROUP           CONSUMER-ID                                    GROUP-INSTANCE-ID HOST            CLIENT-ID                       #PARTITIONS     
DemoConsumer    groupIns2-f050379c-9c0d-433c-bbe0-44de6177b60d groupIns2         /127.0.0.1      consumer-DemoConsumer-groupIns2 0               
DemoConsumer    groupIns1-44805ba9-ae6f-49d3-89af-44a4b95aff8d groupIns1         /127.0.0.1      consumer-DemoConsumer-groupIns1 1                        

if all the GROUP-INSTANCE-ID is null, just as the previous:

GROUP           CONSUMER-ID                                                  HOST            CLIENT-ID               #PARTITIONS     
DemoConsumer    consumer-DemoConsumer-2-89251f12-f0ae-4dc1-a118-bda49f2a6e86 /127.0.0.1      consumer-DemoConsumer-2 0               
DemoConsumer    consumer-DemoConsumer-1-72221c6b-f3d9-4c68-96db-ffffa12ddf93 /127.0.0.1      consumer-DemoConsumer-1 1               

@dengziming
Copy link
Copy Markdown
Member Author

@abbccdda PTAL.

@ghost
Copy link
Copy Markdown

ghost commented Jan 2, 2020

The columns don't line up nicely for me when there is no group instance id:

GROUP                  CONSUMER-ID                                     GROUP-INSTANCE-ID HOST            CLIENT-ID       #PARTITIONS
console-consumer-71167 consumer-1-7969ebf4-6c42-402b-a3e3-ed5d66596ac7                 /127.0.0.1      consumer-1      1

@abbccdda
Copy link
Copy Markdown

abbccdda commented Jan 2, 2020

Thanks for the PR @dengziming. I think the change makes sense, could you also address @WheresAlice comment?

@dengziming dengziming force-pushed the describe-static-member branch 2 times, most recently from 7d42c30 to 70888bd Compare January 3, 2020 02:01
@dengziming
Copy link
Copy Markdown
Member Author

@WheresAlice thank you. this is because of the default column width is 15, but len("GROUP-INSTANCE-ID")=17, so I just change it to 17, and it's better now:

GROUP           CONSUMER-ID                                                  GROUP-INSTANCE-ID  HOST            CLIENT-ID               #PARTITIONS     
DemoConsumer    consumer-DemoConsumer-1-5b54f273-a784-4bc2-9f17-46495b01917b                    /192.168.53.21  consumer-DemoConsumer-1 1               

@abbccdda take a look again.

@ghost
Copy link
Copy Markdown

ghost commented Jan 3, 2020

Yes, that's looking better to me too:

GROUP                  CONSUMER-ID                                     GROUP-INSTANCE-ID HOST            CLIENT-ID       #PARTITIONS
console-consumer-45143 consumer-1-d4eb6170-8aca-46fd-b3cb-f6fc2dc8ceba                   /127.0.0.1      consumer-1      1

LGTM

@dengziming dengziming requested a review from ijuma January 17, 2020 09:13
Copy link
Copy Markdown

@abbccdda abbccdda left a 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, LGTM! Will ping @hachikuji if he has time to take another look

Comment thread core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala Outdated
@dengziming dengziming force-pushed the describe-static-member branch from 70888bd to c8e5957 Compare January 19, 2020 02:56
@dengziming
Copy link
Copy Markdown
Member Author

@ijuma Hi, PTLA.
when groupInsId all null

GROUP           CONSUMER-ID                                                  HOST            CLIENT-ID               #PARTITIONS     
DemoConsumer    consumer-DemoConsumer-2-89251f12-f0ae-4dc1-a118-bda49f2a6e86 /127.0.0.1      consumer-DemoConsumer-2 0               
DemoConsumer    consumer-DemoConsumer-1-72221c6b-f3d9-4c68-96db-ffffa12ddf93 /127.0.0.1      consumer-DemoConsumer-1 1               

when at least one column is not null

GROUP           CONSUMER-ID                                                  GROUP-INSTANCE-ID HOST            CLIENT-ID                       #PARTITIONS     
DemoConsumer    consumer-DemoConsumer-1-ff056df8-f2da-4ec5-af7d-0f1b5a8ea74c                   /127.0.0.1      consumer-DemoConsumer-1         0               
DemoConsumer    groupIns1-63ef1547-3ae8-4d1f-89c7-5d42570c8029               groupIns1         /127.0.0.1      consumer-DemoConsumer-groupIns1 1               

Comment thread core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala Outdated
@dengziming dengziming force-pushed the describe-static-member branch from c8e5957 to 0f7f75b Compare January 31, 2020 07:51
@dengziming
Copy link
Copy Markdown
Member Author

@hachikuji hi, resolved, PTAL.

@dengziming
Copy link
Copy Markdown
Member Author

cc @hachikuji , PTAL.

Copy link
Copy Markdown
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the patch!

@hachikuji
Copy link
Copy Markdown
Contributor

retest this please

@mjsax
Copy link
Copy Markdown
Member

mjsax commented May 27, 2020

Retest this please.

Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@hachikuji hachikuji merged commit 33c8774 into apache:trunk May 27, 2020
@dengziming dengziming deleted the describe-static-member branch October 8, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants