You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ji...@apache.org on 2022/12/01 07:31:40 UTC
[pulsar] branch master updated: [improve][broker] First judge whether config is null when standalone start (#18681)
This is an automated email from the ASF dual-hosted git repository.
jianghaiting 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 bbc7a25d3b2 [improve][broker] First judge whether config is null when standalone start (#18681)
bbc7a25d3b2 is described below
commit bbc7a25d3b2007c84b9bcd3a67205d0256dc4b3c
Author: Ruguo Yu <ji...@163.com>
AuthorDate: Thu Dec 1 15:31:31 2022 +0800
[improve][broker] First judge whether config is null when standalone start (#18681)
---
.../src/main/java/org/apache/pulsar/PulsarStandalone.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
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 06147a1fb3b..5aead455357 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandalone.java
@@ -269,6 +269,11 @@ public class PulsarStandalone implements AutoCloseable {
private boolean usingNewDefaultsPIP117;
public void start() throws Exception {
+ if (config == null) {
+ log.error("Failed to load configuration");
+ System.exit(1);
+ }
+
String forceUseZookeeperEnv = System.getenv(PULSAR_STANDALONE_USE_ZOOKEEPER);
// Allow forcing to use ZK mode via an env variable. eg:
@@ -284,11 +289,6 @@ public class PulsarStandalone implements AutoCloseable {
usingNewDefaultsPIP117 = true;
}
- if (config == null) {
- log.error("Failed to load configuration");
- System.exit(1);
- }
-
log.debug("--- setup PulsarStandaloneStarter ---");
if (!this.isOnlyBroker()) {