From 335b8a8e14f988364ca7db1a0c44168a0eb19e31 Mon Sep 17 00:00:00 2001 From: tedyu Date: Tue, 13 Feb 2018 08:11:03 -0800 Subject: [PATCH] HBASE-19979 ReplicationSyncUp tool may leak Zookeeper connection (Pankaj Kumar) --- .../hbase/replication/regionserver/ReplicationSyncUp.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java index e67ca5b19ba..481302f0b34 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java @@ -110,14 +110,14 @@ public class ReplicationSyncUp extends Configured implements Tool { Thread.sleep(SLEEP_TIME); numberOfOldSource = manager.getOldSources().size(); } + manager.join(); } catch (InterruptedException e) { System.err.println("didn't wait long enough:" + e); return (-1); + } finally { + zkw.close(); } - manager.join(); - zkw.close(); - return (0); }