dasahcc commented on a change in pull request #647: Add java API to create
cluster with CloudConfig
URL: https://github.com/apache/helix/pull/647#discussion_r362569259
##########
File path: helix-core/src/main/java/org/apache/helix/model/CloudConfig.java
##########
@@ -52,30 +55,23 @@
/**
* Instantiate the CloudConfig for the cloud
- * @param cluster
- */
- public CloudConfig(String cluster) {
- super(cluster);
- }
-
- /**
- * Instantiate with a pre-populated record
- * @param record a ZNRecord corresponding to a cloud configuration
*/
- public CloudConfig(ZNRecord record) {
- super(record);
+ private CloudConfig() {
+ super(CLOUD_CONFIG_KW);
}
/**
* Instantiate the config using each field individually.
* Users should use CloudConfig.Builder to create CloudConfig.
- * @param cluster
* @param enabled
+ * @param cloudProvider
* @param cloudID
+ * @param cloudInfoSource
+ * @param cloudProcessorName
*/
- public CloudConfig(String cluster, boolean enabled, CloudProvider
cloudProvider, String cloudID,
+ private CloudConfig(boolean enabled, CloudProvider cloudProvider, String
cloudID,
Review comment:
Let's make it more generic. In the future, if we have more entries, we may
need change the constructor for adding new arguments.
My suggestion will be taking the ZnRecord as the input instead of having all
the entries as arguments. Also that helps to reduce the place containing
specific entries copying logic.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]