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

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
 ##########
 @@ -260,19 +268,32 @@ public HelixAdmin getHelixAdmin() {
    */
   private HelixManager registerAndConnectAsHelixParticipant() {
     HelixManager helixManager = HelixManagerFactory
-        .getZKHelixManager(_helixClusterName, 
CommonConstants.Helix.PREFIX_OF_CONTROLLER_INSTANCE + _instanceId,
-            InstanceType.PARTICIPANT, _helixZkURL);
+        .getZKHelixManager(_helixClusterName, 
_controllerParticipantInstanceId, InstanceType.PARTICIPANT, _helixZkURL);
+
+    StateMachineEngine stateMach = helixManager.getStateMachineEngine();
+    MasterSlaveStateModelFactory factory = new MasterSlaveStateModelFactory();
+    stateMach.registerStateModelFactory(MasterSlaveSMD.name, factory);
     try {
       helixManager.connect();
       return helixManager;
     } catch (Exception e) {
-      String errorMsg =
-          String.format("Exception when connecting the instance %s as 
Participant to Helix.", _instanceId);
+      String errorMsg = String.format("Exception when connecting the instance 
%s as Participant to Helix.",
+          _controllerParticipantInstanceId);
       LOGGER.error(errorMsg, e);
       throw new RuntimeException(errorMsg);
     }
   }
 
+  /**
+   * Add instance group tag for controller so that pinot controller can be 
assigned to lead controller resource.
+   */
+  private void addInstanceGroupTag() {
 
 Review comment:
   Done.

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