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 2022/09/21 14:35:29 UTC

[GitHub] [pulsar] AnonHxy commented on a diff in pull request #17722: support setting bundle number for default namespace when set up cluster

AnonHxy commented on code in PR #17722:
URL: https://github.com/apache/pulsar/pull/17722#discussion_r976593420


##########
pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java:
##########
@@ -233,8 +244,21 @@ public static void main(String[] args) throws Exception {
             System.exit(1);
         }
 
+        int bundleNumberForDefaultNamespace = DEFAULT_BUNDLE_NUMBER;
         try {
-            initializeCluster(arguments);
+            ServiceConfiguration conf =
+                    PulsarConfigurationLoader.create(arguments.brokerConfigFile, ServiceConfiguration.class);
+            if (conf != null && conf.getDefaultNumberOfNamespaceBundles() > 0) {
+                bundleNumberForDefaultNamespace = conf.getDefaultNumberOfNamespaceBundles();
+            }
+        } catch (Exception e) {
+            log.warn("Failed to load broker configuration file {}, use default number of bundles {}",

Review Comment:
   `log.warn` may not print to console.  It's better use `System.out.println` I think



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org