From 066be4a76fdcd825647836d3725f94255759c065 Mon Sep 17 00:00:00 2001 From: WenFeiYi Date: Wed, 12 Aug 2020 16:25:49 +0530 Subject: [PATCH] HBASE-24844 RecoverableZookeeper#close followed by ExecutorService shutdown * Resolves Exception on standalone (master) shutdown Closes #2239 Signed-off-by: Viraj Jasani --- .../main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java index 777776ffc72..136134d85df 100644 --- a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java +++ b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java @@ -694,11 +694,12 @@ public class ZKWatcher implements Watcher, Abortable, Closeable { */ @Override public void close() { - zkEventProcessor.shutdownNow(); try { recoverableZooKeeper.close(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); + } finally { + zkEventProcessor.shutdownNow(); } }