-
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
Upload new replicas infos onto Helix PropertyStore #1249
Conversation
This PR supports uploading infos of new added replicas onto Helix PropertyStore. This is part of move replica which specifies the location of new replicas and their size, partition class etc. The Helix bootstrap upgrade tool will extract diff between static clustermap and clustermap in Helix. The diff is used to generate a map of new added replicas and then upload it to Helix.
Codecov Report
@@ Coverage Diff @@
## master #1249 +/- ##
============================================
+ Coverage 72.18% 72.21% +0.02%
- Complexity 6052 6076 +24
============================================
Files 439 439
Lines 34971 35071 +100
Branches 4437 4459 +22
============================================
+ Hits 25245 25327 +82
- Misses 8568 8580 +12
- Partials 1158 1164 +6
Continue to review full report at Codecov.
|
public static final String PROPERTYSTORE_ZNODE_PATH = "/PROPERTYSTORE/ClusterConfigs/" + ZNODE_NAME; | ||
public static final String PARTITION_OVERRIDE_STR = "PartitionOverride"; | ||
public static final String REPLICA_ADDITION_STR = "ReplicaAddition"; | ||
public static final String PARTITION_OVERRIDE_ZNODE_PATH = "/AdminConfigs/" + PARTITION_OVERRIDE_STR; |
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.
could you add some comments to these three znode path, to describe what are the purpose of them?
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, comments are added
info("Uploading partition override to HelixPropertyStore based on override json file."); | ||
clusterMapToHelixMapper.uploadPartitionOverride(partitionOverrideInfos); | ||
info("Upload cluster configs completed."); | ||
maxPartitionsInOneResource, false, false, helixAdminFactory, ClusterMapConfig.DEFAULT_STATE_MODEL_DEF); |
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.
why it's leaderstandby model? thought it should be the offline/boostrap/leader/standby?
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.
I will make it configurable. For now, we are still using default LeaderStandby model. To use new state model, we first need to create new model on Helix and make all participants register the new model.
public static final String REPLICA_ADDITION_STR = "ReplicaAddition"; | ||
public static final String PARTITION_OVERRIDE_ZNODE_PATH = "/AdminConfigs/" + PARTITION_OVERRIDE_STR; | ||
public static final String REPLICA_ADDITION_ZNODE_PATH = "/AdminConfigs/" + REPLICA_ADDITION_STR; | ||
public static final String PROPERTYSTORE_ZNODE_PATH = "/PROPERTYSTORE/AdminConfigs/"; |
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.
what is the purpose of having this znode when we already have PARTITION_OVERRIDE_ZNODE_PATH?
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.
fair point, I removed PARTITION_OVERRIDE_ZNODE_PATH
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
This PR supports uploading infos of new replicas onto Helix
PropertyStore. This is part of move replica which specifies the location
of new replicas and their size, partition class etc. The Helix bootstrap
upgrade tool will extract diff between static clustermap and clustermap
in Helix. The diff is used to generate a map of new added replicas and
then upload it to Helix.