diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java index 978d5355ebe..40d6691390e 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java @@ -428,7 +428,7 @@ public BookKeeper(ClientConfiguration conf, ZooKeeper zk, EventLoopGroup eventLo // initialize resources this.scheduler = OrderedScheduler.newSchedulerBuilder().numThreads(1).name("BookKeeperClientScheduler").build(); this.highPriorityTaskExecutor = - OrderedScheduler.newSchedulerBuilder().numThreads(1).name("BookKeeperWatchTaskScheduler").build(); + OrderedScheduler.newSchedulerBuilder().numThreads(1).name("BookKeeperHighPriorityThread").build(); this.mainWorkerPool = OrderedExecutor.newBuilder() .name("BookKeeperClientWorker") .numThreads(conf.getNumWorkerThreads()) @@ -1472,7 +1472,8 @@ public void close() throws BKException, InterruptedException { // Close the watchTask scheduler highPriorityTaskExecutor.shutdown(); if (!highPriorityTaskExecutor.awaitTermination(10, TimeUnit.SECONDS)) { - LOG.warn("The highPriorityTaskExecutor for WatchTask did not shutdown cleanly"); + LOG.warn("The highPriorityTaskExecutor for WatchTask did not shutdown cleanly, interrupting"); + highPriorityTaskExecutor.shutdownNow(); } mainWorkerPool.shutdown();