You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/08/12 11:49:40 UTC

[hbase] branch branch-1 updated: HBASE-24844 RecoverableZookeeper#close followed by ExecutorService shutdown

This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
     new 670d70d  HBASE-24844 RecoverableZookeeper#close followed by ExecutorService shutdown
670d70d is described below

commit 670d70deca9b172a8e2c42d7840a3bcf1aee3312
Author: WenFeiYi <we...@gmail.com>
AuthorDate: Wed Aug 12 16:25:49 2020 +0530

    HBASE-24844 RecoverableZookeeper#close followed by ExecutorService shutdown
    
    * Resolves Exception on standalone (master) shutdown
    
    Closes #2239
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
---
 .../main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
index 6e80432..901fc71 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java
@@ -824,11 +824,12 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
    */
   @Override
   public void close() {
-    zkEventProcessor.shutdownNow();
     try {
       recoverableZooKeeper.close();
     } catch (InterruptedException e) {
       Thread.currentThread().interrupt();
+    } finally {
+      zkEventProcessor.shutdownNow();
     }
   }