Repository: hbase Updated Branches: refs/heads/branch-1.4 0a5204a1c -> fb15961b4
HBASE-18675 Making {max,min}SessionTimeout configurable for MiniZooKeeperCluster Signed-off-by: tedyu <yuzhih...@gmail.com> Signed-off-by: Sean Busbey <bus...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fb15961b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fb15961b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fb15961b Branch: refs/heads/branch-1.4 Commit: fb15961b4c0bcde18a5691361d598c87de25a373 Parents: 0a5204a Author: Cesar Delgado <cdelg...@apple.com> Authored: Wed Aug 23 15:37:30 2017 -0700 Committer: Sean Busbey <bus...@apache.org> Committed: Wed Aug 30 14:56:31 2017 -0700 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/fb15961b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java ---------------------------------------------------------------------- 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 ab74318..6cd5a28 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 @@ -227,6 +227,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 {