You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/09/04 07:17:59 UTC

[incubator-pulsar] branch branch-2.1 updated: [functions] Don't set the state storage url if state is not enabled. (#2488)

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

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


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

commit 04c5c48f2fcba7724892f66acf7784518877ba3c
Author: Sijie Guo <gu...@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);