HBASE-25279 Make ZKWatcher ExecutorService launch daemon threads
Closes #2651 Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Yulin Niu <niuyulin@apache.org>
This commit is contained in:
parent
043da5f5ee
commit
ec63cc3144
|
@ -97,7 +97,7 @@ public class ZKWatcher implements Watcher, Abortable, Closeable {
|
||||||
// It is ok to do it in a single thread because the Zookeeper ClientCnxn already serializes the
|
// It is ok to do it in a single thread because the Zookeeper ClientCnxn already serializes the
|
||||||
// requests using a single while loop and hence there is no performance degradation.
|
// requests using a single while loop and hence there is no performance degradation.
|
||||||
private final ExecutorService zkEventProcessor = Executors.newSingleThreadExecutor(
|
private final ExecutorService zkEventProcessor = Executors.newSingleThreadExecutor(
|
||||||
new ThreadFactoryBuilder().setNameFormat("zk-event-processor-pool-%d")
|
new ThreadFactoryBuilder().setNameFormat("zk-event-processor-pool-%d").setDaemon(true)
|
||||||
.setUncaughtExceptionHandler(Threads.LOGGING_EXCEPTION_HANDLER).build());
|
.setUncaughtExceptionHandler(Threads.LOGGING_EXCEPTION_HANDLER).build());
|
||||||
|
|
||||||
private final Configuration conf;
|
private final Configuration conf;
|
||||||
|
|
Loading…
Reference in New Issue