sijie closed pull request #2488: [functions] Don't set the state storage url if state is not enabled. URL: https://github.com/apache/incubator-pulsar/pull/2488
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): 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 cf07d8c8ba..b6105c9948 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 @@ void start() throws Exception { // 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); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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