KAFKA-14595 Move ReassignPartitionsCommand to java#13247
KAFKA-14595 Move ReassignPartitionsCommand to java#13247jolshan merged 106 commits intoapache:trunkfrom
Conversation
|
This PR is a first part of moving |
|
Is |
When move But, I propose to move with small steps and split moving in several changes. It seems new java classes can be keep in |
3aa7274 to
77a363b
Compare
77a363b to
ffe57e5
Compare
|
If you want to do it in small steps, one way is that you introduce the new classes, but you do not update the command to use them. That way you can put them in the right destination from the start. In any case, I'll leave it to @mimaison to say how he'd prefer it. |
|
Hello @ijuma
It's more about simplifing review then my personal preferences :) For now, I introduced java classes from |
|
@mimaison Please, share your feedback. Are you ready to review and merge current changes (only case classes and options moved to java code) or should I continue work and rewrite the whole command in Java? |
|
I think we should directly move the classes to the tools module instead of temporarily keeping them in core. Since it's one of the large tools, it's ok to first create the new classes in tools and rewrite the tool in a follow up PR as Ismael suggested. |
Are you suggesting to perform all moving in one PR? |
We can create the new Java classes in tools and not touch the existing Scala code. Then in a second time, we can rewrite the tool in Java using the new classes and delete all the old Scala code. |
Thanks for feedback. OK. I will move new classes to tools and revert scala code changes made in this PR. |
|
@mimaison New classes moved to tools. Please, share your opinion - should I continue work on this task and move task logic to java? |
|
This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has merge conflicts, please update it with the latest from trunk (or appropriate release branch) |
|
CI looks OK |
|
@jolshan Before merging you probably want to run the ReassignPartitionsTest and ThrottlingTest system tests to verify the command still works as expected. |
|
@mimaison Thanks for the hint. I will run system tests, also. |
|
|
|
|
|
Note, this PR and #14588 are mutual exclusive. |
jolshan
left a comment
There was a problem hiding this comment.
Looks good. I will give Mickael a day or so for any further comments.
|
@jolshan Looks like we good to go. Are you ready to merge this PR? |
|
Hello @mimaison |
|
Thanks all for the help, review and merge! |
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
…he#14456) This PR is part of apache#13247 It contains ReassignPartitionsIntegrationTest rewritten in java. Goal of PR is reduce changes size in main PR. Reviewers: Taras Ledkov <tledkov@apache.org>, Justine Olshan <jolshan@confluent.io>
This PR contains changes required to move PartitionReassignmentState class to java code. Reviewers: Mickael Maison <mickael.maison@gmail.com>, Justine Olshan <jolshan@confluent.io>, Federico Valeri <fedevaleri@gmail.com>, Taras Ledkov Taras Ledkov <tledkov@apache.org>, Kamal Chandraprakash<kamal.chandraprakash@gmail.com>,
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
…he#14456) This PR is part of apache#13247 It contains ReassignPartitionsIntegrationTest rewritten in java. Goal of PR is reduce changes size in main PR. Reviewers: Taras Ledkov <tledkov@apache.org>, Justine Olshan <jolshan@confluent.io>
This PR contains changes required to move PartitionReassignmentState class to java code. Reviewers: Mickael Maison <mickael.maison@gmail.com>, Justine Olshan <jolshan@confluent.io>, Federico Valeri <fedevaleri@gmail.com>, Taras Ledkov Taras Ledkov <tledkov@apache.org>, Kamal Chandraprakash<kamal.chandraprakash@gmail.com>,
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
| * | ||
| * @return A result that is useful for testing. | ||
| */ | ||
| static VerifyAssignmentResult verifyAssignment(Admin adminClient, |
There was a problem hiding this comment.
Hi @nizhikov, I found many methods are static methods (which means default permission), our application uses the function of partition assignment(not script), and we are using the partition assignment in our app by scala API. but now we can't access these static methods.
verifyAssignment(org.apache.kafka.clients.admin.Admin, java.lang.String, java.lang.Boolean)' is not public in 'org.apache.kafka.tools.reassign.ReassignPartitionsCommand'. Cannot be accessed from outside package
There was a problem hiding this comment.
Yes. It's an expected side effect.
Methods of this class are not public API and can be changed without any restrictions.
I advice you to modify your code.
|
see https://github.com/apache/kafka/blob/9570c67b8c4ed1a4c3888511adad58d9b3a8bc0f/core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala#L1208 During the rewrite for [KAFKA-14595](#13247), the relevant condition was omitted. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
see https://github.com/apache/kafka/blob/9570c67b8c4ed1a4c3888511adad58d9b3a8bc0f/core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala#L1208 During the rewrite for [KAFKA-14595](#13247), the relevant condition was omitted. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
see https://github.com/apache/kafka/blob/9570c67b8c4ed1a4c3888511adad58d9b3a8bc0f/core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala#L1208 During the rewrite for [KAFKA-14595](#13247), the relevant condition was omitted. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
see https://github.com/apache/kafka/blob/9570c67b8c4ed1a4c3888511adad58d9b3a8bc0f/core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala#L1208 During the rewrite for [KAFKA-14595](apache#13247), the relevant condition was omitted. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
see https://github.com/apache/kafka/blob/9570c67b8c4ed1a4c3888511adad58d9b3a8bc0f/core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala#L1208 During the rewrite for [KAFKA-14595](apache#13247), the relevant condition was omitted. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This PR contains changes required to move
PartitionReassignmentStateclass to java code.Committer Checklist (excluded from commit message)