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 2021/01/21 19:03:31 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #9260: [Functions] Can't create functions with m-TLS

sijie commented on a change in pull request #9260:
URL: https://github.com/apache/pulsar/pull/9260#discussion_r562126814



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -1316,19 +1323,24 @@ private void startPackagesManagementService() throws IOException {
     public static WorkerConfig initializeWorkerConfigFromBrokerConfig(ServiceConfiguration brokerConfig,
                                                                       String workerConfigFile) throws IOException {
         WorkerConfig workerConfig = WorkerConfig.load(workerConfigFile);
+
+        brokerConfig.getWebServicePort()
+            .map(port -> workerConfig.setWorkerPort(port));
+        brokerConfig.getWebServicePortTls()
+            .map(port -> workerConfig.setWorkerPortTls(port));
+
         // worker talks to local broker
         String hostname = ServiceConfigurationUtils.getDefaultOrConfiguredAddress(
             brokerConfig.getAdvertisedAddress());
         workerConfig.setWorkerHostname(hostname);
-        workerConfig.setWorkerPort(brokerConfig.getWebServicePort().get());
         workerConfig.setWorkerId(
             "c-" + brokerConfig.getClusterName()
                 + "-fw-" + hostname
-                + "-" + workerConfig.getWorkerPort());
+                + "-" + (workerConfig.getWorkerPort() != null
+                    ? workerConfig.getWorkerPort() : workerConfig.getWorkerPortTls()));

Review comment:
       Sure. can make that change.




----------------------------------------------------------------
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