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:
Josh Elser 2020-11-12 16:52:58 -05:00
parent 15d27450c2
commit 46ea169ea7
1 changed files with 1 additions and 1 deletions

View File

@ -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
// requests using a single while loop and hence there is no performance degradation.
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());
private final Configuration conf;