-
Notifications
You must be signed in to change notification settings - Fork 275
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
Support for Helix Auto Registration #2982
base: master
Are you sure you want to change the base?
Conversation
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Outdated
Show resolved
Hide resolved
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Outdated
Show resolved
Hide resolved
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Outdated
Show resolved
Hide resolved
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Outdated
Show resolved
Hide resolved
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Show resolved
Hide resolved
@@ -96,7 +101,14 @@ public DataNodeConfigSource getDataNodeConfigSource(ClusterMapConfig clusterMapC | |||
* @return a new instance of {@link HelixManager}. | |||
*/ | |||
HelixManager buildZKHelixManager(String clusterName, String instanceName, InstanceType instanceType, String zkAddr) { | |||
return HelixManagerFactory.getZKHelixManager(clusterName, instanceName, instanceType, zkAddr); | |||
HelixManagerProperty participantHelixProperty = new HelixManagerProperty.Builder().setDefaultInstanceConfigBuilder( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to create a flag in config to switch b/w old logic and new logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you can add a comment explaining what is autoregistration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for flag here as we are not changing the way we connect to helix. In this we are providing an InstanceConfig as extra configuration while connection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will be tested in EI for sometime. We will need prod deployments to go through while wait for validation. And if we encounter some issue, we can just turn off the the flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no auto registration at this point. Auto registration will have two requisites after this enabling cloud config and taking dependency on helix-cloud in closed.
Now for this specific change, it is change to the factory method on how we instantiate the HelixManager. I have added an additional test as safety check.
I don't think there should be any issue due to this but I can hold off from merging until I test on perf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, check if this is not getting used in VCR too.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Show resolved
Hide resolved
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixFactory.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks overall good to me. Added one minor comment.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Support for Helix Auto Registration. This will enable Ambry DataNodes to auto-join Helix cluster. AutoRegistration changes were available in
[email protected]
which is only Java11 compatible so I had to pin down dependency of this version to Java8 supported snapshotTesting
./gradlew clean build