[HELIX-570] Add default state model definitions if not already exists when controller starts
Review Request #31397 - Created Feb. 25, 2015 and updated
| Information | |
|---|---|
| Zhen Zhang | |
| helix-git | |
| 570 | |
| Reviewers | |
| helix | |
| kishoreg, slu | |
When controller starts, we can add missing default state model definitions to the cluster. This is useful for example, a legacy cluster is created without some new default state model definitions. Instead of building a tool to populate the new default state model definitions to existing clusters, controller can check this and add it if necessary.
mvn test
Ship It!
-
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java (Diff revision 1) -
can we avoid bringing code from tools into core? tools package has lot of unwanted code and we should move it out into helix-tools module. when we do that helix-tools will depend on helix-core
-
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java (Diff revision 1) -
we should call it addDefaultStateModelDefinitions()
-
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java (Diff revision 1) -
why is this removed as part of this rb?
-
helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java (Diff revision 1) -
we need to chose a better name, we DefaultStateModelDefinition seems like a one that we would use if no state model is specified.
-
I like that we have one place to view all the statemodels, we should get rid of state model config generator class and have one class for each statemodeldefinition
-
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java (Diff revision 1) -
will reorg the class
-
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java (Diff revision 1) -
will fix it.
-
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java (Diff revision 1) -
CONTROLLER and CONTROLLER_PARTICIPANT have the same code. Just clean it up.
-
helix-core/src/main/java/org/apache/helix/tools/ClusterSetup.java (Diff revision 1) -
how about BuildinStateModelDefinitions
-
will fix this.
Change Summary:
apply comments
-
helix-core/src/main/java/org/apache/helix/model/BuildInSMD.java (Diff revision 2) -
rename to BuiltInStateModelDefinitions or StateModelDefinitionsProvided, we also have statemodeldefinitionBuilder, i think its will be nice to provide methods on the builder for every statemodel
Diff: |
Revision 3 (+1039 -420)
|
|---|