Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NPE: namespaceService need leaderElection service (apache#3238)
### Motivation namespace-service uses leaderElectionService so, leaderElectionService should start before namespace-service. ``` Caused by: java.lang.NullPointerException at org.apache.pulsar.broker.namespace.NamespaceService.searchForCandidateBroker(NamespaceService.java:376) ~[pulsar-broker-2.2.jar] ... 9 more at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) ~[?:1.8.0_131] at org.apache.pulsar.broker.namespace.NamespaceService.searchForCandidateBroker(NamespaceService.java:395) ~[pulsar-broker-2.2.jar] at org.apache.pulsar.broker.namespace.NamespaceService.lambda$22(NamespaceService.java:335) ~[pulsar-broker-2.2.jar] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_131] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [pulsar-functions-metrics-2.2.2-yahoo.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] ```
- Loading branch information