HBASE-13183 Make ZK tickTime configurable in standalone HBase (Alex Araujo)
This commit is contained in:
parent
280120ee15
commit
4afae59cfa
|
@ -202,6 +202,10 @@ public final class HConstants {
|
|||
public static final String ZOOKEEPER_DATA_DIR =
|
||||
ZK_CFG_PROPERTY_PREFIX + "dataDir";
|
||||
|
||||
/** Parameter name for the ZK tick time */
|
||||
public static final String ZOOKEEPER_TICK_TIME =
|
||||
ZK_CFG_PROPERTY_PREFIX + "tickTime";
|
||||
|
||||
/** Default limit on concurrent client-side zookeeper connections */
|
||||
public static final int DEFAULT_ZOOKEPER_MAX_CLIENT_CNXNS = 300;
|
||||
|
||||
|
|
|
@ -191,6 +191,11 @@ public class HMasterCommandLine extends ServerCommandLine {
|
|||
}
|
||||
}
|
||||
zooKeeperCluster.setDefaultClientPort(zkClientPort);
|
||||
// set the ZK tick time if specified
|
||||
int zkTickTime = conf.getInt(HConstants.ZOOKEEPER_TICK_TIME, 0);
|
||||
if (zkTickTime > 0) {
|
||||
zooKeeperCluster.setTickTime(zkTickTime);
|
||||
}
|
||||
|
||||
// login the zookeeper server principal (if using security)
|
||||
ZKUtil.loginServer(conf, "hbase.zookeeper.server.keytab.file",
|
||||
|
|
Loading…
Reference in New Issue