virajjasani commented on code in PR #4829:
URL: https://github.com/apache/hbase/pull/4829#discussion_r994162853


##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java:
##########
@@ -735,13 +735,21 @@ public void 
interruptedExceptionNoThrow(InterruptedException ie, boolean throwLa
    */
   @Override
   public void close() {
+    LOG.info("ZKWatcher close started.");
+    zkEventProcessor.shutdown();
     try {
-      recoverableZooKeeper.close();
+      zkEventProcessor.awaitTermination(60, TimeUnit.SECONDS);
     } catch (InterruptedException e) {
+      LOG.warn("ZKWatcher event processor has not finished to terminate.");
       Thread.currentThread().interrupt();
     } finally {
-      zkEventProcessor.shutdownNow();
+      try {
+        recoverableZooKeeper.close();
+      } catch (InterruptedException e) {
+        Thread.currentThread().interrupt();
+      }
     }
+    LOG.info("ZKWatcher close finished.");

Review Comment:
   I think this is redundant, can be removed.



##########
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java:
##########
@@ -735,13 +735,21 @@ public void 
interruptedExceptionNoThrow(InterruptedException ie, boolean throwLa
    */
   @Override
   public void close() {
+    LOG.info("ZKWatcher close started.");

Review Comment:
   This one also can be removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to