jiajunwang commented on a change in pull request #695: Modify participant 
manager to add cluster auto registration logic
URL: https://github.com/apache/helix/pull/695#discussion_r373219244
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java
 ##########
 @@ -132,42 +139,102 @@ public void handleNewSession() throws Exception {
   }
 
   private void joinCluster() {
-    // Read cluster config and see if instance can auto join the cluster
+    // Read cluster config and see if an instance can auto join or auto 
register to the cluster
     boolean autoJoin = false;
+    boolean autoRegistration = false;
     try {
-      HelixConfigScope scope =
-          new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER).forCluster(
-              _manager.getClusterName()).build();
-      autoJoin =
-          Boolean.parseBoolean(_configAccessor.get(scope,
-              ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN));
+      HelixConfigScope scope = new 
HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER)
+          .forCluster(_manager.getClusterName()).build();
+      autoJoin = Boolean
+          .parseBoolean(_configAccessor.get(scope, 
ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN));
       LOG.info("instance: " + _instanceName + " auto-joining " + _clusterName 
+ " is " + autoJoin);
     } catch (Exception e) {
       // autoJoin is false
     }
 
+    // Read cloud config and see if an instance can auto register to the 
cluster
+    try {
+      autoRegistration =
 
 Review comment:
   So cloud enabled == auto join?
   If so, let's document it more clear.

----------------------------------------------------------------
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]

Reply via email to