浏览代码

HADOOP-15449. Increase default timeout of ZK session to avoid frequent NameNode failover

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit 61df174e8b3d582183306cabfa2347c8b96322ff)
Karthik Palanisamy 7 年之前
父节点
当前提交
961c0461fe

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java

@@ -64,7 +64,7 @@ public abstract class ZKFailoverController {
   
   public static final String ZK_QUORUM_KEY = "ha.zookeeper.quorum";
   private static final String ZK_SESSION_TIMEOUT_KEY = "ha.zookeeper.session-timeout.ms";
-  private static final int ZK_SESSION_TIMEOUT_DEFAULT = 5*1000;
+  private static final int ZK_SESSION_TIMEOUT_DEFAULT = 10*1000;
   private static final String ZK_PARENT_ZNODE_KEY = "ha.zookeeper.parent-znode";
   public static final String ZK_ACL_KEY = "ha.zookeeper.acl";
   private static final String ZK_ACL_DEFAULT = "world:anyone:rwcda";

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/resources/core-default.xml

@@ -2136,7 +2136,7 @@
 
 <property>
   <name>ha.zookeeper.session-timeout.ms</name>
-  <value>5000</value>
+  <value>10000</value>
   <description>
     The session timeout to use when the ZKFC connects to ZooKeeper.
     Setting this value to a lower value implies that server crashes