You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by je...@apache.org on 2019/05/02 02:23:07 UTC

[pulsar] branch master updated: function worker should inherit super users from brokers (#4189)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 78dbd9b  function worker should inherit super users from brokers (#4189)
78dbd9b is described below

commit 78dbd9b064d61374c1348ec1531da5929c8edb3d
Author: Boyang Jerry Peng <je...@gmail.com>
AuthorDate: Wed May 1 19:23:02 2019 -0700

    function worker should inherit super users from brokers (#4189)
---
 .../src/main/java/org/apache/pulsar/PulsarBrokerStarter.java          | 4 ++++
 pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java   | 3 +++
 2 files changed, 7 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 bda08b2..3ef104f 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
@@ -175,6 +175,10 @@ public class PulsarBrokerStarter {
                 workerConfig.setConfigurationStoreServers(brokerConfig.getConfigurationStoreServers());
                 workerConfig.setZooKeeperSessionTimeoutMillis(brokerConfig.getZooKeeperSessionTimeoutMillis());
                 workerConfig.setZooKeeperOperationTimeoutSeconds(brokerConfig.getZooKeeperOperationTimeoutSeconds());
+
+                // inherit super users
+                workerConfig.setSuperUserRoles(brokerConfig.getSuperUserRoles());
+
                 functionsWorkerService = new WorkerService(workerConfig);
             } else {
                 functionsWorkerService = null;
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 2ec79a0..cc146b8 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
@@ -307,6 +307,9 @@ public class PulsarStandalone implements AutoCloseable {
             workerConfig.setZooKeeperSessionTimeoutMillis(config.getZooKeeperSessionTimeoutMillis());
             workerConfig.setZooKeeperOperationTimeoutSeconds(config.getZooKeeperOperationTimeoutSeconds());
 
+            // inherit super users
+            workerConfig.setSuperUserRoles(config.getSuperUserRoles());
+
             fnWorkerService = new WorkerService(workerConfig);
         }