Author: todd
Date: Fri Apr 6 04:27:44 2012
New Revision: 1310165
URL: http://svn.apache.org/viewvc?rev=1310165&view=rev
Log:
HDFS-3200. Scope all ZKFC configurations by nameservice. Contributed by Todd
Lipcon.
Modified:
hadoop/common/branches/HDFS-3042/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
Modified:
hadoop/common/branches/HDFS-3042/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3042/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java?rev=1310165&r1=1310164&r2=1310165&view=diff
==============================================================================
---
hadoop/common/branches/HDFS-3042/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
(original)
+++
hadoop/common/branches/HDFS-3042/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
Fri Apr 6 04:27:44 2012
@@ -44,7 +44,6 @@ public abstract class ZKFailoverControll
static final Log LOG = LogFactory.getLog(ZKFailoverController.class);
- // TODO: this should be namespace-scoped
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;
@@ -54,6 +53,19 @@ public abstract class ZKFailoverControll
public static final String ZK_AUTH_KEY = "ha.zookeeper.auth";
static final String ZK_PARENT_ZNODE_DEFAULT = "/hadoop-ha";
+ /**
+ * All of the conf keys used by the ZKFC. This is used in order to allow
+ * them to be overridden on a per-nameservice or per-namenode basis.
+ */
+ protected static final String[] ZKFC_CONF_KEYS = new String[] {
+ ZK_QUORUM_KEY,
+ ZK_SESSION_TIMEOUT_KEY,
+ ZK_PARENT_ZNODE_KEY,
+ ZK_ACL_KEY,
+ ZK_AUTH_KEY
+ };
+
+
/** Unable to format the parent znode in ZK */
static final int ERR_CODE_FORMAT_DENIED = 2;
/** The parent znode doesn't exist in ZK */