jackjlli commented on a change in pull request #4047: Create 
leadControllerResource in helix cluster
URL: https://github.com/apache/incubator-pinot/pull/4047#discussion_r289588934
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/util/HelixSetupUtils.java
 ##########
 @@ -65,25 +69,32 @@
 
   public static synchronized HelixManager setup(String helixClusterName, 
String zkPath,
       String pinotControllerInstanceId, boolean isUpdateStateModel, boolean 
enableBatchMessageMode) {
-
     try {
-      createHelixClusterIfNeeded(helixClusterName, zkPath, isUpdateStateModel, 
enableBatchMessageMode);
+      setupHelixCluster(helixClusterName, zkPath, isUpdateStateModel, 
enableBatchMessageMode);
     } catch (final Exception e) {
-      LOGGER.error("Caught exception", e);
+      LOGGER.error("Caught exception when setting up Helix cluster: {}", 
helixClusterName, e);
       return null;
     }
 
     try {
       return startHelixControllerInStandadloneMode(helixClusterName, zkPath, 
pinotControllerInstanceId);
     } catch (final Exception e) {
-      LOGGER.error("Caught exception", e);
+      LOGGER.error("Caught exception when starting helix controller", e);
       return null;
     }
   }
 
-  public static void createHelixClusterIfNeeded(String helixClusterName, 
String zkPath, boolean isUpdateStateModel,
+  public static void setupHelixCluster(String helixClusterName, String zkPath, 
boolean isUpdateStateModel,
       boolean enableBatchMessageMode) {
     final HelixAdmin admin = new ZKHelixAdmin(zkPath);
+
+    createHelixClusterIfNeeded(helixClusterName, zkPath, admin, 
isUpdateStateModel, enableBatchMessageMode);
 
 Review comment:
   PR updated.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to