You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/07/07 00:37:10 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #7131: Fixing Controller/Broker/Server/Minion zk and cluster name configs in PinotServiceMananger when start using config file

Jackie-Jiang commented on a change in pull request #7131:
URL: https://github.com/apache/incubator-pinot/pull/7131#discussion_r664959301



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/StartBrokerCommand.java
##########
@@ -141,6 +136,13 @@ public boolean execute()
     Map<String, Object> properties = new HashMap<>();
     if (_configFileName != null) {
       properties.putAll(PinotConfigUtils.readConfigFromFile(_configFileName));
+      // Override the zkAddress and clusterName to ensure ServiceManager is connecting to the right Zookeeper and Cluster.
+      if (properties.containsKey(CommonConstants.Helix.CONFIG_OF_ZOOKEEPR_SERVER) && properties.get(CommonConstants.Helix.CONFIG_OF_ZOOKEEPR_SERVER) != null) {
+        _zkAddress = properties.get(CommonConstants.Helix.CONFIG_OF_ZOOKEEPR_SERVER).toString();
+      }

Review comment:
       Can be simplified, same for other places
   ```suggestion
         Object zkAddressProperty = properties.get(CommonConstants.Helix.CONFIG_OF_ZOOKEEPR_SERVER);
         if (zkAddressProperty != null) {
           _zkAddress = zkAddressProperty.toString();
         }
   ```




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

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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