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_r362570043
##########
File path: helix-core/src/main/java/org/apache/helix/model/CloudConfig.java
##########
@@ -188,11 +184,17 @@ public Builder() {
}
/**
- * Constructor with Cluster Name as input
- * @param clusterName
+ * Instantiate with a pre-populated record
+ * @param record a ZNRecord corresponding to a cloud configuration
*/
- public Builder(String clusterName) {
- _clusterName = clusterName;
+ public Builder(ZNRecord record) {
+ _cloudEnabled =
record.getBooleanField(CloudConfigProperty.CLOUD_ENABLED.name(), false);
+ _cloudProvider =
+
CloudProvider.valueOf(record.getSimpleField(CloudConfigProperty.CLOUD_PROVIDER.name()));
+ _cloudID = record.getSimpleField(CloudConfigProperty.CLOUD_ID.name());
+ _cloudInfoSources =
record.getListField(CloudConfigProperty.CLOUD_INFO_SOURCE.name());
+ _cloudInfoProcessorName =
+
record.getSimpleField(CloudConfigProperty.CLOUD_INFO_PROCESSOR_NAME.name());
Review comment:
We can keep a record as internal member.
----------------------------------------------------------------
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]