diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java index 5cb286bf2d3..3a42ea02b23 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java @@ -270,6 +270,8 @@ public class MiniZooKeeperCluster { throw new IOException("Waiting for shutdown of standalone server"); } + zooKeeperServers.get(activeZKServerIndex).getZKDatabase().close(); + // remove the current active zk server standaloneServerFactoryList.remove(activeZKServerIndex); clientPortList.remove(activeZKServerIndex); @@ -311,6 +313,8 @@ public class MiniZooKeeperCluster { throw new IOException("Waiting for shutdown of standalone server"); } + zooKeeperServers.get(backupZKServerIndex).getZKDatabase().close(); + // remove this backup zk server standaloneServerFactoryList.remove(backupZKServerIndex); clientPortList.remove(backupZKServerIndex);