Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from ZK to Kafka Admin Client #1569

Merged
merged 10 commits into from
Jul 15, 2021

Conversation

tomncooper
Copy link
Contributor

@tomncooper tomncooper commented May 19, 2021

This PR partially resolves #1415.

To keep code review easier I am proposing to make changes in stages, starting with the KafkaTopicConfigProvider and then moving on to the other classes which use AdminZkClient.

@tomncooper
Copy link
Contributor Author

tomncooper commented May 19, 2021

@Lincong @efeg I have started the work on removing the ZkAdminClient, currently (to keep the size of the code review down) this just deals with the KafkaTopicConfigProvider. If you are happy with the general approach I can either add to this PR or open separate ones?

@tomncooper
Copy link
Contributor Author

This converts the default KafkaTopicConfigProvider to use the Kafka Admin Client and creates a new TopicConfigProvider implementation that uses the ZkAdminClient so a user could switch back to the old Provider logic if they need to?

@efeg efeg self-requested a review May 19, 2021 19:05
@efeg
Copy link
Collaborator

efeg commented May 19, 2021

@tomncooper Thanks for the PR! I will try to review it within this week.

@efeg efeg linked an issue May 19, 2021 that may be closed by this pull request
Copy link
Collaborator

@efeg efeg left a comment

Choose a reason for hiding this comment

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

@tomncooper Thanks for the PR!
Made a first pass and left a few comments.

@tomncooper tomncooper force-pushed the zk-admin-removal branch 2 times, most recently from deb24a2 to 80fe8b6 Compare May 24, 2021 17:01
@tomncooper tomncooper requested a review from efeg May 24, 2021 17:01
Copy link
Collaborator

@efeg efeg 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 changes! Left more comments.

@tomncooper tomncooper force-pushed the zk-admin-removal branch 4 times, most recently from f6319f5 to 95e8ef1 Compare June 3, 2021 18:01
@tomncooper tomncooper requested a review from efeg June 3, 2021 18:41
@tomncooper tomncooper marked this pull request as ready for review June 3, 2021 18:43
Copy link
Collaborator

@efeg efeg 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 update!
Left a few initial comments, will take a closer look at KafkaAdminTopicConfigProvider.java later.

Copy link
Collaborator

@efeg efeg 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 updates! Left comments.

@tomncooper tomncooper force-pushed the zk-admin-removal branch 2 times, most recently from 83ecc95 to ac760f7 Compare June 7, 2021 17:48
@efeg
Copy link
Collaborator

efeg commented Jun 9, 2021

@tomncooper the build seems to have failed due to style issues:

> Task :cruise-control:checkstyleMain
[ant:checkstyle] [ERROR] /home/circleci/workspace/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/config/JsonFileTopicConfigProvider.java:52: Multiple empty lines after this line [RegexpMultiline]
[ant:checkstyle] [ERROR] /home/circleci/workspace/cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/config/TopicConfigProvider.java:12:1: Extra separation in import group before 'org.apache.kafka.common.annotation.InterfaceStability' [CustomImportOrder]

@tomncooper
Copy link
Contributor Author

tomncooper commented Jun 10, 2021

@tomncooper the build seems to have failed due to style issues:

Sorry about that. I keep hitting checkstyle issues (I need to tweak my IDE). I have made a pre-commit hook to run checkstyle before each commit. I submitted a PR (#1584) in case any other devs might find that useful.

@tomncooper tomncooper requested a review from efeg June 11, 2021 08:43
Copy link
Collaborator

@efeg efeg left a comment

Choose a reason for hiding this comment

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

Left a few nits. Once they are addressed, the PR looks good to me.

@efeg
Copy link
Collaborator

efeg commented Jun 29, 2021

Hi @tomncooper -- do you think we can address the remaining items this week to merge this PR?

@tomncooper
Copy link
Contributor Author

Hi @efeg, yes, I got sidetracked with some other things. I will try and address these this week.

@tomncooper
Copy link
Contributor Author

Hi @efeg, I think I addressed all your comments. Thanks.

Signed-off-by: Thomas Cooper <code@tomcooper.dev>
* Changed ZK based provider to use old class name and gave new Kafka Admin provider new name
* Added deprecated annotation to old ZK provider and additional javadoc
  explaining the deprecation.
* Switched to using the configured admin client timeout from the main config class
* Fixed Copy Right date
… parent class

Signed-off-by: Thomas Cooper <code@tomcooper.dev>
…nstance from LoadMonitor

Signed-off-by: Thomas Cooper <code@tomcooper.dev>
Signed-off-by: Thomas Cooper <code@tomcooper.dev>
…n the KafkaAdminTopicConfigProvider

Signed-off-by: Thomas Cooper <code@tomcooper.dev>
…common config key to abstract parent class

Signed-off-by: Thomas Cooper <code@tomcooper.dev>
…afka Admin Topic Config Provider

Signed-off-by: Thomas Cooper <code@tomcooper.dev>
Signed-off-by: Thomas Cooper <code@tomcooper.dev>
Signed-off-by: Thomas Cooper <code@tomcooper.dev>
Copy link
Collaborator

@efeg efeg 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 updates! LGTM.

@efeg efeg merged commit 30ecf7b into linkedin:migrate_to_kafka_2_5 Jul 15, 2021
efeg pushed a commit to efeg/cruise-control that referenced this pull request Jul 15, 2021
efeg pushed a commit to efeg/cruise-control that referenced this pull request Jul 15, 2021
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.

Replace AdminZkClient with AdminClient
2 participants