From b5942241cadd79147a5d65457f93aaa39aa7118e Mon Sep 17 00:00:00 2001 From: Cesar Delgado Date: Wed, 23 Aug 2017 15:37:30 -0700 Subject: [PATCH] HBASE-18675 Making {max,min}SessionTimeout configurable for MiniZooKeeperCluster Signed-off-by: tedyu Signed-off-by: Sean Busbey --- .../apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java | 3 +++ 1 file changed, 3 insertions(+) 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 8432a1b10fd..2cc89f0765c 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 @@ -225,6 +225,9 @@ public class MiniZooKeeperCluster { } ZooKeeperServer server = new ZooKeeperServer(dir, dir, tickTimeToUse); + // Setting {min,max}SessionTimeout defaults to be the same as in Zookeeper + server.setMinSessionTimeout(configuration.getInt("hbase.zookeeper.property.minSessionTimeout", -1)); + server.setMaxSessionTimeout(configuration.getInt("hbase.zookeeper.property.maxSessionTimeout", -1)); NIOServerCnxnFactory standaloneServerFactory; while (true) { try {