hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/4] hbase git commit: HBASE-13183 Make ZK tickTime configurable in standalone HBase (Alex Araujo)
Date Tue, 10 Mar 2015 01:35:09 GMT
HBASE-13183 Make ZK tickTime configurable in standalone HBase (Alex Araujo)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cafbc04f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cafbc04f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cafbc04f

Branch: refs/heads/branch-1.0
Commit: cafbc04f33e0bc0774e7a67d3e3fdf7322661d70
Parents: 5af7bf1
Author: Andrew Purtell <apurtell@apache.org>
Authored: Mon Mar 9 18:34:47 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon Mar 9 18:34:47 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/HConstants.java       | 4 ++++
 .../java/org/apache/hadoop/hbase/master/HMasterCommandLine.java | 5 +++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/cafbc04f/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 029fbbe..4411343 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -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;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/cafbc04f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
index f1606f1..e3109c2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
@@ -162,6 +162,11 @@ public class HMasterCommandLine extends ServerCommandLine {
               + HConstants.ZOOKEEPER_CLIENT_PORT);
         }
         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",


Mime
View raw message