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/07/24 08:54:09 UTC
[incubator-pulsar] branch master updated: set worker port to be
broker service port when running worker with broker (#2218)
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 725d3af set worker port to be broker service port when running worker with broker (#2218)
725d3af is described below
commit 725d3af4a4bbc1f7abd0d11786a945d5b49f745e
Author: Boyang Jerry Peng <je...@gmail.com>
AuthorDate: Tue Jul 24 01:54:07 2018 -0700
set worker port to be broker service port when running worker with broker (#2218)
The port for the function worker should be same as the broker service port when the worker service is run as part of the broker
---
pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java | 1 +
pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java | 1 +
2 files changed, 2 insertions(+)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
index 24e3fda..42e5f6e 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
@@ -156,6 +156,7 @@ public class PulsarBrokerStarter {
String hostname = ServiceConfigurationUtils.getDefaultOrConfiguredAddress(
brokerConfig.getAdvertisedAddress());
workerConfig.setWorkerHostname(hostname);
+ workerConfig.setWorkerPort(brokerConfig.getWebServicePort());
workerConfig.setWorkerId(
"c-" + brokerConfig.getClusterName()
+ "-fw-" + hostname
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 28e839b..3e44f76 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
@@ -276,6 +276,7 @@ public class PulsarStandalone implements AutoCloseable {
String hostname = ServiceConfigurationUtils.getDefaultOrConfiguredAddress(
config.getAdvertisedAddress());
workerConfig.setWorkerHostname(hostname);
+ workerConfig.setWorkerPort(config.getWebServicePort());
workerConfig.setWorkerId(
"c-" + config.getClusterName()
+ "-fw-" + hostname