KAFKA-5370: Replace uses of the old consumer with the new consumer when possible#3320
KAFKA-5370: Replace uses of the old consumer with the new consumer when possible#3320vahidhashemian wants to merge 4 commits intoapache:trunkfrom
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): |
|
@ijuma Is this close to what you had in mind by your earlier comment? Thanks. |
b7e2211 to
96f91b7
Compare
|
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): |
|
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): |
ijuma
left a comment
There was a problem hiding this comment.
Thanks for the PR and sorry for the delay. I left some comments. Also, it would be great if we could update ProducerBounceTest to use the new consumer.
There was a problem hiding this comment.
We should use a JUnit assertion (i.e. assertTrue).
There was a problem hiding this comment.
Can you elaborate on why many of these tests were removed?
There was a problem hiding this comment.
In this PR I used an API that did not provide some of the details the deprecated API provided. In the new patch I switch to Metadata API that seem to cover the missing info. So, these tests will be back in the new patch.
There was a problem hiding this comment.
Maybe this should be a method in BrokerEndPoint.
There was a problem hiding this comment.
This doesn't seem to make sense since we are now using the new consumer.
There was a problem hiding this comment.
In the new patch this method is no longer needed.
There was a problem hiding this comment.
On second thought, this should probably not be here. AdminUtils is the place for methods that interact with ZK. We could add it to the ClientUtils in the client module maybe (that makes it clear that we are communicating with Kafka via the protocol).
There was a problem hiding this comment.
Do we want to deprecate ClientUtils? If so, should we find another host for this method? Suggestions? What do you think about channelToAnyBroker and channelToOffsetManager?
|
One more thing: we should consider removing methods from the Scala |
|
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): |
vahidhashemian
left a comment
There was a problem hiding this comment.
@ijuma Thanks for reviewing the PR. I tried to address your comments. I asked inline about where to put a couple of existing methods. Let me know if you have any suggestions. Thanks.
There was a problem hiding this comment.
Do we want to deprecate ClientUtils? If so, should we find another host for this method? Suggestions? What do you think about channelToAnyBroker and channelToOffsetManager?
There was a problem hiding this comment.
In the new patch this method is no longer needed.
There was a problem hiding this comment.
In this PR I used an API that did not provide some of the details the deprecated API provided. In the new patch I switch to Metadata API that seem to cover the missing info. So, these tests will be back in the new patch.
96f91b7 to
1303425
Compare
|
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): |
|
@ijuma I'm making some additional adjustments. Please hold off reviewing until the next patch is submitted. Thanks. |
|
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): |
9263bb6 to
23ffb1b
Compare
|
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): |
|
@ijuma The PR should be in a better shape now. We may need to move the methods from |
…ssible - Uses of the old consumers in tools and tests where the new consumer would work as well (or better).
…ssible Uses of the old consumers in tools and tests where the new consumer would work as well (or better) should be updated. Conflicts: core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala
23ffb1b to
2c282a9
Compare
…ssible Uses of the old consumers in tools and tests where the new consumer would work as well (or better) should be updated. Conflicts: core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala Conflicts: core/src/test/scala/integration/kafka/api/ProducerBounceTest.scala core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala
2c282a9 to
d26e488
Compare
|
Sorry, I dropped the ball on this review. I don't think this PR is relevant anymore, but I did include you as a co-author in #5220 which overlaps a bit with one of the changes in this PR. |
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. so that it doesn't rely on old clients code). Additional improvements have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - apache#2891 - apache#3051 - apache#3320 One of them remains relevant in the context of KIP-308, but the others are not. I included the authors of the 3 PRs as co-authors. Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. so that it doesn't rely on old clients code). Additional improvements have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - apache#2891 - apache#3051 - apache#3320 One of them remains relevant in the context of KIP-308, but the others are not. I included the authors of the 3 PRs as co-authors. Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. it no longer relies on Scala clients code). Additional improvements (not included here) have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - #2891 - #3051 - #3320 One of them remains relevant in the context of KIP-308, but the others have been superseded. I included the authors of the 3 PRs as co-authors. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Vahid Hashemian <vahidhashemian@us.ibm.com>, Manikumar Reddy <manikumar.reddy@gmail.com> Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. it no longer relies on Scala clients code). Additional improvements (not included here) have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - apache#2891 - apache#3051 - apache#3320 One of them remains relevant in the context of KIP-308, but the others have been superseded. I included the authors of the 3 PRs as co-authors. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Vahid Hashemian <vahidhashemian@us.ibm.com>, Manikumar Reddy <manikumar.reddy@gmail.com> Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
This does the minimal amount of work so that the tool relies on public non-deprecated APIs (i.e. it no longer relies on Scala clients code). Additional improvements (not included here) have been proposed via KIP-308. There are a few other PRs that touch this class with overlapping goals: - apache#2891 - apache#3051 - apache#3320 One of them remains relevant in the context of KIP-308, but the others have been superseded. I included the authors of the 3 PRs as co-authors. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Vahid Hashemian <vahidhashemian@us.ibm.com>, Manikumar Reddy <manikumar.reddy@gmail.com> Co-authored-by: Arseniy Tashoyan <tashoyan@gmail.com> Co-authored-by: Vahid Hashemian <vahidhashemian@us.ibm.com> Co-authored-by: Mohammed Amine GARMES Co-authored-by: Ismael Juma <ismael@juma.me.uk>
Also, methods in
ClientUtilsthat are called by server or tools code are introduced inAdminUtilswith the implementation living inAdminUtils. All the existing callers apart from the old clients call theAdminUtilsmethods.