This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 4124de1  [functions] Don't set the state storage url if state is not 
enabled. (#2488)
4124de1 is described below

commit 4124de11c407e7a5efa8aa2f4b669e22543ee427
Author: Sijie Guo <guosi...@gmail.com>
AuthorDate: Tue Sep 4 00:17:29 2018 -0700

    [functions] Don't set the state storage url if state is not enabled. (#2488)
---
 pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
index cf07d8c..b6105c9 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
@@ -273,7 +273,10 @@ public class PulsarStandalone implements AutoCloseable {
             // worker talks to local broker
             workerConfig.setPulsarServiceUrl("pulsar://127.0.0.1:" + 
config.getBrokerServicePort());
             workerConfig.setPulsarWebServiceUrl("http://127.0.0.1:"; + 
config.getWebServicePort());
-            workerConfig.setStateStorageServiceUrl("bk://127.0.0.1:" + 
this.getStreamStoragePort());
+            if (!this.isNoStreamStorage()) {
+                // only set the state storage service url when state is 
enabled.
+                workerConfig.setStateStorageServiceUrl("bk://127.0.0.1:" + 
this.getStreamStoragePort());
+            }
             String hostname = 
ServiceConfigurationUtils.getDefaultOrConfiguredAddress(
                 config.getAdvertisedAddress());
             workerConfig.setWorkerHostname(hostname);

Reply via email to