Skip to content

KAFKA-5647: Use KafkaZkClient in ReassignPartitionsCommand and PreferredReplicaLeaderElectionCommand#4260

Closed
omkreddy wants to merge 3 commits into
apache:trunkfrom
omkreddy:KAFKA-5647-ADMINCOMMANDS
Closed

KAFKA-5647: Use KafkaZkClient in ReassignPartitionsCommand and PreferredReplicaLeaderElectionCommand#4260
omkreddy wants to merge 3 commits into
apache:trunkfrom
omkreddy:KAFKA-5647-ADMINCOMMANDS

Conversation

@omkreddy

Copy link
Copy Markdown
Contributor
  • Use KafkaZkClient in ReassignPartitionsCommand
  • Use KafkaZkClient in PreferredReplicaLeaderElectionCommand
  • Updated test classes to use new methods
  • All existing tests should pass

Committer Checklist (excluded from commit message)

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

@omkreddy

omkreddy commented Nov 23, 2017

Copy link
Copy Markdown
Contributor Author

@junrao @ijuma

  1. In previous PRs, I have updated TopicCommand and ConfigCommand. In this PR, I am updating ReassignPartitionsCommand, ReassignPartitionsCommand. Since these changes breaks existing users code, I am going to add a upgrade note. Do you see any other issues with these changes?

  2. I have not updated ConsumerGroupCommand methods. These are deprecated old consumer related methods.

  3. Should we replace all the usages of TopicAndPartition with TopicPartition class from ReassignPartitionsCommand.

@omkreddy omkreddy force-pushed the KAFKA-5647-ADMINCOMMANDS branch from b0dcf9f to 19ecfa8 Compare November 23, 2017 17:43
@ijuma

ijuma commented Nov 24, 2017

Copy link
Copy Markdown
Member

Thanks for the PR. Since we are in the process of converting some of these tools to AdminClient, maybe we can do that instead? We have a PR from @tombentley for PreferredReplicaLeaderElectionCommand and he was also working on one for ReassignPartitionsCommand .

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.

Do we need line 28 above ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, we need the import

@omkreddy

Copy link
Copy Markdown
Contributor Author

@ijuma It makes sense to avoid multiple iterations of these classes. We can deprecate and later remove ZK based implementations. I will leave it to you and @junrao to decide the scope/need of this PR.

@omkreddy

omkreddy commented Dec 7, 2017

Copy link
Copy Markdown
Contributor Author

@junrao your thoughts on this?

@junrao junrao left a comment

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.

@omkreddy : Thanks for the patch. The plan in KIP-183 is to deprecate the zookeeper option in PreferredReplicaCommand and not remove the zookeeper code. So, it's probably still useful to get this patch in so that we can remove the old ZkClient dependency sooner. A few minor comments below. Also, it's probably better to replace all the usages of TopicAndPartition with TopicPartition class from ReassignPartitionsCommand.

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.

Could we add the return type?

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.

Could we just use createRecursive to create the full path?

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.

Could we just use createRecursive to create the full path?

@ijuma

ijuma commented Dec 7, 2017

Copy link
Copy Markdown
Member

@junrao, what is your plan for removing ZkUtils and AdminUtils? Probably not before 2.0, right? So, it seems like it would be removed at the same time as the ZK-based parts of PreferredReplicaCommand. We can do this PR, but it doesn't seem like it helps us remove ZkUtils faster.

@junrao

junrao commented Dec 7, 2017

Copy link
Copy Markdown
Contributor

@ijuma : Yes, we probably can't remove ZkUtils and AdminUtils any time soon. I am just not sure when we can deprecate the zookeeper option in the tools. We probably don't want to keep using the old ZK utils there.

@omkreddy

omkreddy commented Dec 8, 2017

Copy link
Copy Markdown
Contributor Author

@junrao Thanks for the review. Updated the PR with review comments. Pls take a look.

Will update remaining test classes in another PR.

@omkreddy

Copy link
Copy Markdown
Contributor Author

@junrao pinging for review

@omkreddy omkreddy force-pushed the KAFKA-5647-ADMINCOMMANDS branch from e6c1455 to 4c15081 Compare December 18, 2017 08:46
@omkreddy

Copy link
Copy Markdown
Contributor Author

retest this please

@omkreddy

Copy link
Copy Markdown
Contributor Author

@junrao pinging for review

@junrao

junrao commented Dec 20, 2017

Copy link
Copy Markdown
Contributor

@omkreddy : Thanks for the patch. Sorry for the delay. LGTM.

@asfgit asfgit closed this in 488ea4b Dec 20, 2017
@omkreddy omkreddy deleted the KAFKA-5647-ADMINCOMMANDS branch July 3, 2018 15:42
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