Making {max,min}SessionTimeout configurable for MiniZooKeeperCluster

Signed-off-by: tedyu <yuzhihong@gmail.com>
Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Cesar Delgado 2017-08-23 15:37:30 -07:00 committed by Sean Busbey
parent 7465973068
commit bcefdf7d18
1 changed files with 3 additions and 0 deletions

View File

@ -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 {