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 2021/04/01 18:40:10 UTC
[pulsar] branch master updated: Fix 'Global' cluster will create in
standalone mode. #10067 (#10068)
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/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new bf34bb0 Fix 'Global' cluster will create in standalone mode. #10067 (#10068)
bf34bb0 is described below
commit bf34bb0de2b8ada63c9d83784744971da741295d
Author: Tboy <te...@apache.org>
AuthorDate: Fri Apr 2 02:39:43 2021 +0800
Fix 'Global' cluster will create in standalone mode. #10067 (#10068)
Fix #10067 .
---
pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 51adb8e..43e4c24 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
@@ -375,7 +375,9 @@ public class PulsarStandalone implements AutoCloseable {
}
// Create marker for "global" cluster
- if (!admin.clusters().getClusters().contains(globalCluster)) {
+ try {
+ admin.clusters().getCluster(globalCluster);
+ } catch (PulsarAdminException.NotFoundException ex) {
admin.clusters().createCluster(globalCluster, new ClusterData(null, null));
}