Skip to content

KAFKA-8538 (part of KIP-345): add group.instance.id to DescribeGroup#6957

Merged
guozhangwang merged 5 commits intoapache:trunkfrom
abbccdda:describe_instance_id
Jun 28, 2019
Merged

KAFKA-8538 (part of KIP-345): add group.instance.id to DescribeGroup#6957
guozhangwang merged 5 commits intoapache:trunkfrom
abbccdda:describe_instance_id

Conversation

@abbccdda
Copy link
Copy Markdown

Include group.instance.id in the describe group result for better visibility.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@hachikuji @guozhangwang I noticed that this class was only used in the deprecated admin client, do we still need to add group.instance.id support to it? If not, I could consider removing the follow-up changes in scala code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think @ijuma already have a PR for removing the deprecated admin clients. We can wait for his PR to be merged first?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I merged it.

@abbccdda abbccdda force-pushed the describe_instance_id branch 2 times, most recently from 4f30df9 to a855838 Compare June 17, 2019 22:30
@abbccdda abbccdda changed the title KAFKA-8538: add group.instance.id to DescribeGroup KAFKA-8538 (part of KIP-345): add group.instance.id to DescribeGroup Jun 17, 2019
@abbccdda abbccdda force-pushed the describe_instance_id branch from a855838 to f9fb070 Compare June 18, 2019 20:52
@abbccdda
Copy link
Copy Markdown
Author

retest this please

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think @ijuma already have a PR for removing the deprecated admin clients. We can wait for his PR to be merged first?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually the constructor of all such description classes can just be default package-private since they are only used by KafkaAdminClient, and hence can just be private APIs, and we do not need to deprecate-overload any more.

Comment thread core/src/test/scala/unit/kafka/coordinator/group/GroupCoordinatorTest.scala Outdated
@abbccdda abbccdda force-pushed the describe_instance_id branch from f9fb070 to 3a7aee6 Compare June 21, 2019 18:48
Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

LGTM except one minor comment, ping another pair of eyes before merging.

private final MemberAssignment assignment;

public MemberDescription(String memberId, String clientId, String host, MemberAssignment assignment) {
public MemberDescription(String memberId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As mentioned above, we can make this constructor default access.

@abbccdda
Copy link
Copy Markdown
Author

Retest this please

1 similar comment
@abbccdda
Copy link
Copy Markdown
Author

Retest this please

@abbccdda
Copy link
Copy Markdown
Author

@ableegoldman @vvcephei Could you also take a look?

Copy link
Copy Markdown
Member

@ableegoldman ableegoldman left a comment

Choose a reason for hiding this comment

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

LGTM

@abbccdda
Copy link
Copy Markdown
Author

@ableegoldman Thank you!

@abbccdda
Copy link
Copy Markdown
Author

Retest this please

@guozhangwang guozhangwang merged commit f8db022 into apache:trunk Jun 28, 2019
hachikuji pushed a commit that referenced this pull request Jul 12, 2019
This patch fixes a compatibility breaking `MemberDescription` constructor change in #6957. It also updates `equals` and `hashCode` for the new `groupInstanceId` field that was added in the same patch.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
bfncs pushed a commit to bfncs/kafka that referenced this pull request Jul 12, 2019
)

This patch fixes a compatibility breaking `MemberDescription` constructor change in apache#6957. It also updates `equals` and `hashCode` for the new `groupInstanceId` field that was added in the same patch.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>
hachikuji pushed a commit that referenced this pull request May 27, 2020
#7886)

Kafka-8538(#6957) has already added `group.instance.id` to `MemberDescription` but didn't print it in the describe group output, so this patch adds the logic to do so.

Before the change, the describe command prints 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 prints 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               
```

Reviewers: Alice <WheresAlice@users.noreply.github.com>, Matthias J. Sax <matthias@confluent.io>, Boyang Chen <boyang@confluent.io>, Jason Gustafson <jason@confluent.io>
@abbccdda abbccdda deleted the describe_instance_id branch July 6, 2020 21: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