[improve][broker] First judge whether config is null when standalone start
@@ -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()) {
