You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/03/11 02:48:28 UTC

[GitHub] [pulsar] lsy180829 commented on a change in pull request #3790: Pulsar standalone does not read zk port form conf/standalone.conf

lsy180829 commented on a change in pull request #3790: Pulsar standalone does not read zk port form conf/standalone.conf
URL: https://github.com/apache/pulsar/pull/3790#discussion_r264078833
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java
 ##########
 @@ -71,8 +72,20 @@ public PulsarStandaloneStarter(String[] args) throws Exception {
         }
 
         // Set ZK server's host to localhost
-        config.setZookeeperServers(zkServers + ":" + this.getZkPort());
-        config.setConfigurationStoreServers(zkServers + ":" + this.getZkPort());
+        // Priority: args > conf > default
+        if ( argsContains(args,"--zookeeper-port") ) {
+            config.setZookeeperServers(zkServers + ":" + this.getZkPort());
+        } else {
+            if (config.getZookeeperServers() != null) {
+                this.setZkPort(Integer.parseInt(config.getZookeeperServers().split(":")[1]));
+            }
+            config.setZookeeperServers(zkServers + ":" + this.getZkPort());
+        }
+
+        if ( config.getConfigurationStoreServers() == null ) {
 
 Review comment:
   Changed, thanks!

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


With regards,
Apache Git Services