gaozhangmin commented on a change in pull request #14450:
URL: https://github.com/apache/pulsar/pull/14450#discussion_r829699012



##########
File path: conf/functions_worker.yml
##########
@@ -26,6 +26,13 @@ workerHostname: localhost
 workerPort: 6750
 workerPortTls: 6751
 
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the 
schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK 
chroot path)
+metadataStoreUrl: zk:localhost:2181

Review comment:
       metadataStoreUrl is used for  
BookKeeperPackagesStorage#initializeDlogNamespace。If we want to start  
BookKeeperPackagesStorage storage service  in a separately running workers. we 
must support this configuration.

##########
File path: conf/functions_worker.yml
##########
@@ -45,6 +52,10 @@ metadataStoreCacheExpirySeconds: 300
 ################################
 # Function package management
 ################################
+packagesManagementStorageProvider:
+    
org.apache.pulsar.packages.management.storage.bookkeeper.BookKeeperPackagesStorageProvider
+packagesManagementLedgerRootPath: /ledgers
+packagesReplicas: 1

Review comment:
       Run Functions-worker separately, independent with broker, in this 
situation, if we want to start packageManagement service in worker, We should 
have this configurations.

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -780,14 +780,14 @@ public void start() throws PulsarServerException {
 
             acquireSLANamespace();
 
-            // start function worker service if necessary
-            this.startWorkerService(brokerService.getAuthenticationService(), 
brokerService.getAuthorizationService());
-
             // start packages management service if necessary
             if (config.isEnablePackagesManagement()) {
                 this.startPackagesManagementService();
             }

Review comment:
       There are two situations:
   1、Run Functions-worker with brokers. If broker enables  function worker 
without enabling packageManagement,  packageManagement service is enabled in 
worker by default. Else, worker will use packageManagement service enabled by 
broker.
   2、Run Functions-worker separately. Without broker, We enable 
packageManagement service  in worker by default

##########
File path: conf/functions_worker.yml
##########
@@ -26,6 +26,13 @@ workerHostname: localhost
 workerPort: 6750
 workerPortTls: 6751
 
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the 
schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK 
chroot path)
+metadataStoreUrl: zk:localhost:2181

Review comment:
       We can be back to use configurationMetadataStoreUrl if metadataStoreUrl 
is not set.

##########
File path: conf/functions_worker.yml
##########
@@ -26,6 +26,13 @@ workerHostname: localhost
 workerPort: 6750
 workerPortTls: 6751
 
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the 
schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK 
chroot path)
+metadataStoreUrl: zk:localhost:2181

Review comment:
       metadataStoreUrl is used for  BookKeeperPackagesStorageConfiguration 
getMetadataStoreUrl。

##########
File path: conf/functions_worker.yml
##########
@@ -26,6 +26,13 @@ workerHostname: localhost
 workerPort: 6750
 workerPortTls: 6751
 
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the 
schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK 
chroot path)
+metadataStoreUrl: zk:localhost:2181

Review comment:
       metadataStoreUrl is used for  BookKeeperPackagesStorageConfiguration 
`getMetadataStoreUrl`。

##########
File path: conf/functions_worker.yml
##########
@@ -26,6 +26,13 @@ workerHostname: localhost
 workerPort: 6750
 workerPortTls: 6751
 
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the 
schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK 
chroot path)
+metadataStoreUrl: zk:localhost:2181

Review comment:
       We can be back to use configurationMetadataStoreUrl if metadataStoreUrl 
is not set.

##########
File path: conf/functions_worker.yml
##########
@@ -26,6 +26,13 @@ workerHostname: localhost
 workerPort: 6750
 workerPortTls: 6751
 
+# The metadata store URL
+# Examples:
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+# * my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 (will default to ZooKeeper when the 
schema is not specified)
+# * zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181/my-chroot-path (to add a ZK 
chroot path)
+metadataStoreUrl: zk:localhost:2181

Review comment:
       @nlu90 




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to