hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [1/2] hbase git commit: HBASE-16690 Move znode path configs to a separated class
Date Wed, 05 Oct 2016 12:18:29 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 617dfe18c -> 3aa4dfa73


http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index b07a40c..159d067 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -3225,7 +3225,7 @@ public class HRegionServer extends HasThread implements
   }
 
   private String getMyEphemeralNodePath() {
-    return ZKUtil.joinZNode(this.zooKeeper.rsZNode, getServerName().toString());
+    return ZKUtil.joinZNode(this.zooKeeper.znodePaths.rsZNode, getServerName().toString());
   }
 
   private boolean isHealthCheckerConfigured() {
@@ -3267,7 +3267,7 @@ public class HRegionServer extends HasThread implements
 
     try {
       long lastRecordedFlushedSequenceId = -1;
-      String nodePath = ZKUtil.joinZNode(this.zooKeeper.recoveringRegionsZNode,
+      String nodePath = ZKUtil.joinZNode(this.zooKeeper.znodePaths.recoveringRegionsZNode,
         regionInfo.getEncodedName());
       // recovering-region level
       byte[] data;
@@ -3308,7 +3308,7 @@ public class HRegionServer extends HasThread implements
     String result = null;
     long maxZxid = 0;
     ZooKeeperWatcher zkw = this.getZooKeeper();
-    String nodePath = ZKUtil.joinZNode(zkw.recoveringRegionsZNode, encodedRegionName);
+    String nodePath = ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode, encodedRegionName);
     List<String> failedServers = ZKUtil.listChildrenNoWatch(zkw, nodePath);
     if (failedServers == null || failedServers.isEmpty()) {
       return result;

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java
index 6485e4a..1a603e0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java
@@ -147,7 +147,7 @@ public abstract class HBaseReplicationEndpoint extends BaseReplicationEndpoint
    */
   protected static List<ServerName> fetchSlavesAddresses(ZooKeeperWatcher zkw)
       throws KeeperException {
-    List<String> children = ZKUtil.listChildrenAndWatchForNewChildren(zkw, zkw.rsZNode);
+    List<String> children = ZKUtil.listChildrenAndWatchForNewChildren(zkw, zkw.znodePaths.rsZNode);
     if (children == null) {
       return Collections.emptyList();
     }
@@ -208,7 +208,7 @@ public abstract class HBaseReplicationEndpoint extends BaseReplicationEndpoint
     public PeerRegionServerListener(HBaseReplicationEndpoint replicationPeer) {
       super(replicationPeer.getZkw());
       this.replicationEndpoint = replicationPeer;
-      this.regionServerListNode = replicationEndpoint.getZkw().rsZNode;
+      this.regionServerListNode = replicationEndpoint.getZkw().znodePaths.rsZNode;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/ZKPermissionWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/ZKPermissionWatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/ZKPermissionWatcher.java
index c4b3219..308ef41 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/ZKPermissionWatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/ZKPermissionWatcher.java
@@ -66,7 +66,7 @@ public class ZKPermissionWatcher extends ZooKeeperListener implements Closeable
     super(watcher);
     this.authManager = authManager;
     String aclZnodeParent = conf.get("zookeeper.znode.acl.parent", ACL_NODE);
-    this.aclZNode = ZKUtil.joinZNode(watcher.baseZNode, aclZnodeParent);
+    this.aclZNode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, aclZnodeParent);
     executor = Executors.newSingleThreadExecutor(
       new DaemonThreadFactory("zk-permission-watcher"));
   }
@@ -249,7 +249,7 @@ public class ZKPermissionWatcher extends ZooKeeperListener implements Closeable
    */
   public void writeToZookeeper(byte[] entry, byte[] permsData) {
     String entryName = Bytes.toString(entry);
-    String zkNode = ZKUtil.joinZNode(watcher.baseZNode, ACL_NODE);
+    String zkNode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, ACL_NODE);
     zkNode = ZKUtil.joinZNode(zkNode, entryName);
 
     try {
@@ -267,7 +267,7 @@ public class ZKPermissionWatcher extends ZooKeeperListener implements Closeable
    * @param tableName
    */
   public void deleteTableACLNode(final TableName tableName) {
-    String zkNode = ZKUtil.joinZNode(watcher.baseZNode, ACL_NODE);
+    String zkNode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, ACL_NODE);
     zkNode = ZKUtil.joinZNode(zkNode, tableName.getNameAsString());
 
     try {
@@ -284,7 +284,7 @@ public class ZKPermissionWatcher extends ZooKeeperListener implements Closeable
    * Delete the acl notify node of namespace
    */
   public void deleteNamespaceACLNode(final String namespace) {
-    String zkNode = ZKUtil.joinZNode(watcher.baseZNode, ACL_NODE);
+    String zkNode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, ACL_NODE);
     zkNode = ZKUtil.joinZNode(zkNode, AccessControlLists.NAMESPACE_PREFIX + namespace);
 
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java
index a1c3b66..f9d716b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java
@@ -52,7 +52,7 @@ public class ZKSecretWatcher extends ZooKeeperListener {
     super(watcher);
     this.secretManager = secretManager;
     String keyZNodeParent = conf.get("zookeeper.znode.tokenauth.parent", DEFAULT_ROOT_NODE);
-    this.baseKeyZNode = ZKUtil.joinZNode(watcher.baseZNode, keyZNodeParent);
+    this.baseKeyZNode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, keyZNodeParent);
     this.keysParentZNode = ZKUtil.joinZNode(baseKeyZNode, DEFAULT_KEYS_PARENT);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ZKVisibilityLabelWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ZKVisibilityLabelWatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ZKVisibilityLabelWatcher.java
index f30136f..a60a3e9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ZKVisibilityLabelWatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ZKVisibilityLabelWatcher.java
@@ -53,8 +53,8 @@ public class ZKVisibilityLabelWatcher extends ZooKeeperListener {
     String labelZnodeParent = conf.get(VISIBILITY_LABEL_ZK_PATH, DEFAULT_VISIBILITY_LABEL_NODE);
     String userAuthsZnodeParent = conf.get(VISIBILITY_USER_AUTHS_ZK_PATH,
         DEFAULT_VISIBILITY_USER_AUTHS_NODE);
-    this.labelZnode = ZKUtil.joinZNode(watcher.baseZNode, labelZnodeParent);
-    this.userAuthsZnode = ZKUtil.joinZNode(watcher.baseZNode, userAuthsZnodeParent);
+    this.labelZnode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, labelZnodeParent);
+    this.userAuthsZnode = ZKUtil.joinZNode(watcher.znodePaths.baseZNode, userAuthsZnodeParent);
   }
 
   public void start() throws KeeperException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
index f116c2e..efd75a6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
@@ -697,7 +697,7 @@ public class HBaseFsck extends Configured implements Closeable {
   private boolean setMasterInMaintenanceMode() throws IOException {
     RetryCounter retryCounter = createZNodeRetryCounterFactory.create();
     hbckEphemeralNodePath = ZKUtil.joinZNode(
-      ZooKeeperWatcher.masterMaintZNode,
+      zkw.znodePaths.masterMaintZNode,
       "hbck-" + Long.toString(EnvironmentEdgeManager.currentTime()));
     do {
       try {
@@ -3406,7 +3406,7 @@ public class HBaseFsck extends Configured implements Closeable {
   private void unassignMetaReplica(HbckInfo hi) throws IOException, InterruptedException,
   KeeperException {
     undeployRegions(hi);
-    ZKUtil.deleteNode(zkw, zkw.getZNodeForReplica(hi.metaEntry.getReplicaId()));
+    ZKUtil.deleteNode(zkw, zkw.znodePaths.getZNodeForReplica(hi.metaEntry.getReplicaId()));
   }
 
   private void assignMetaReplica(int replicaId)

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java
index aa55d67..a63a8be 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java
@@ -54,7 +54,7 @@ public class ZKDataMigrator {
   public static Map<TableName, TableState.State> queryForTableStates(ZooKeeperWatcher zkw)
       throws KeeperException, InterruptedException {
     Map<TableName, TableState.State> rv = new HashMap<>();
-    List<String> children = ZKUtil.listChildrenNoWatch(zkw, zkw.tableZNode);
+    List<String> children = ZKUtil.listChildrenNoWatch(zkw, zkw.znodePaths.tableZNode);
     if (children == null)
       return rv;
     for (String child: children) {
@@ -94,7 +94,7 @@ public class ZKDataMigrator {
   private static  ZooKeeperProtos.DeprecatedTableState.State getTableState(
       final ZooKeeperWatcher zkw, final TableName tableName)
       throws KeeperException, InterruptedException {
-    String znode = ZKUtil.joinZNode(zkw.tableZNode, tableName.getNameAsString());
+    String znode = ZKUtil.joinZNode(zkw.znodePaths.tableZNode, tableName.getNameAsString());
     byte [] data = ZKUtil.getData(zkw, znode);
     if (data == null || data.length <= 0) return null;
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/ReplicationChecker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/ReplicationChecker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/ReplicationChecker.java
index 8d66c8f..4a430ec 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/ReplicationChecker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/ReplicationChecker.java
@@ -80,7 +80,7 @@ public class ReplicationChecker {
     }
 
     String replicationZNodeName = conf.get("zookeeper.znode.replication", "replication");
-    String replicationZNode = ZKUtil.joinZNode(this.zkw.baseZNode, replicationZNodeName);
+    String replicationZNode = ZKUtil.joinZNode(this.zkw.znodePaths.baseZNode, replicationZNodeName);
     String hfileRefsZNodeName =
         conf.get(ReplicationStateZKBase.ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_KEY,
           ReplicationStateZKBase.ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_DEFAULT);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ClusterStatusTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ClusterStatusTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ClusterStatusTracker.java
index 989c5fd..524f9ab 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ClusterStatusTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ClusterStatusTracker.java
@@ -46,7 +46,7 @@ public class ClusterStatusTracker extends ZooKeeperNodeTracker {
    * @param abortable
    */
   public ClusterStatusTracker(ZooKeeperWatcher watcher, Abortable abortable) {
-    super(watcher, watcher.clusterStateZNode, abortable);
+    super(watcher, watcher.znodePaths.clusterStateZNode, abortable);
   }
 
   /**
@@ -66,9 +66,9 @@ public class ClusterStatusTracker extends ZooKeeperNodeTracker {
   throws KeeperException {
     byte [] upData = toByteArray();
     try {
-      ZKUtil.createAndWatch(watcher, watcher.clusterStateZNode, upData);
+      ZKUtil.createAndWatch(watcher, watcher.znodePaths.clusterStateZNode, upData);
     } catch(KeeperException.NodeExistsException nee) {
-      ZKUtil.setData(watcher, watcher.clusterStateZNode, upData);
+      ZKUtil.setData(watcher, watcher.znodePaths.clusterStateZNode, upData);
     }
   }
 
@@ -79,10 +79,10 @@ public class ClusterStatusTracker extends ZooKeeperNodeTracker {
   public void setClusterDown()
   throws KeeperException {
     try {
-      ZKUtil.deleteNode(watcher, watcher.clusterStateZNode);
+      ZKUtil.deleteNode(watcher, watcher.znodePaths.clusterStateZNode);
     } catch(KeeperException.NoNodeException nne) {
       LOG.warn("Attempted to set cluster as down but already down, cluster " +
-          "state node (" + watcher.clusterStateZNode + ") not found");
+          "state node (" + watcher.znodePaths.clusterStateZNode + ") not found");
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/DrainingServerTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/DrainingServerTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/DrainingServerTracker.java
index 5969143..684fdec 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/DrainingServerTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/DrainingServerTracker.java
@@ -69,7 +69,7 @@ public class DrainingServerTracker extends ZooKeeperListener {
   public void start() throws KeeperException, IOException {
     watcher.registerListener(this);
     List<String> servers =
-      ZKUtil.listChildrenAndWatchThem(watcher, watcher.drainingZNode);
+      ZKUtil.listChildrenAndWatchThem(watcher, watcher.znodePaths.drainingZNode);
     add(servers);
   }
 
@@ -96,7 +96,7 @@ public class DrainingServerTracker extends ZooKeeperListener {
 
   @Override
   public void nodeDeleted(final String path) {
-    if(path.startsWith(watcher.drainingZNode)) {
+    if(path.startsWith(watcher.znodePaths.drainingZNode)) {
       final ServerName sn = ServerName.valueOf(ZKUtil.getNodeName(path));
       LOG.info("Draining RS node deleted, removing from list [" +
           sn + "]");
@@ -106,10 +106,10 @@ public class DrainingServerTracker extends ZooKeeperListener {
 
   @Override
   public void nodeChildrenChanged(final String path) {
-    if(path.equals(watcher.drainingZNode)) {
+    if(path.equals(watcher.znodePaths.drainingZNode)) {
       try {
         final List<String> newNodes =
-          ZKUtil.listChildrenAndWatchThem(watcher, watcher.drainingZNode);
+          ZKUtil.listChildrenAndWatchThem(watcher, watcher.znodePaths.drainingZNode);
         add(newNodes);
       } catch (KeeperException e) {
         abortable.abort("Unexpected zk exception getting RS nodes", e);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
index 742cc6d..c59fbb3 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
@@ -38,7 +38,7 @@ public class LoadBalancerTracker extends ZooKeeperNodeTracker {
 
   public LoadBalancerTracker(ZooKeeperWatcher watcher,
       Abortable abortable) {
-    super(watcher, watcher.balancerZNode, abortable);
+    super(watcher, watcher.znodePaths.balancerZNode, abortable);
   }
 
   /**
@@ -64,11 +64,11 @@ public class LoadBalancerTracker extends ZooKeeperNodeTracker {
   public void setBalancerOn(boolean balancerOn) throws KeeperException {
   byte [] upData = toByteArray(balancerOn);
     try {
-      ZKUtil.setData(watcher, watcher.balancerZNode, upData);
+      ZKUtil.setData(watcher, watcher.znodePaths.balancerZNode, upData);
     } catch(KeeperException.NoNodeException nne) {
-      ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);
+      ZKUtil.createAndWatch(watcher, watcher.znodePaths.balancerZNode, upData);
     }
-    super.nodeDataChanged(watcher.balancerZNode);
+    super.nodeDataChanged(watcher.znodePaths.balancerZNode);
   }
 
   private byte [] toByteArray(boolean isBalancerOn) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterMaintenanceModeTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterMaintenanceModeTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterMaintenanceModeTracker.java
index fc0e05f..bf73d76 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterMaintenanceModeTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterMaintenanceModeTracker.java
@@ -40,7 +40,7 @@ public class MasterMaintenanceModeTracker extends ZooKeeperListener {
   }
 
   private void update(String path) {
-    if (path.startsWith(ZooKeeperWatcher.masterMaintZNode)) {
+    if (path.startsWith(watcher.znodePaths.masterMaintZNode)) {
       update();
     }
   }
@@ -48,7 +48,7 @@ public class MasterMaintenanceModeTracker extends ZooKeeperListener {
   private void update() {
     try {
       List<String> children =
-          ZKUtil.listChildrenAndWatchForNewChildren(watcher, ZooKeeperWatcher.masterMaintZNode);
+          ZKUtil.listChildrenAndWatchForNewChildren(watcher, watcher.znodePaths.masterMaintZNode);
       hasChildren = (children != null && children.size() > 0);
     } catch (KeeperException e) {
       // Ignore the ZK keeper exception

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
index 5fff9d2..abe9d22 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
@@ -54,7 +54,7 @@ public class RecoveringRegionWatcher extends ZooKeeperListener {
     }
 
     String parentPath = path.substring(0, path.lastIndexOf('/'));
-    if (!this.watcher.recoveringRegionsZNode.equalsIgnoreCase(parentPath)) {
+    if (!this.watcher.znodePaths.recoveringRegionsZNode.equalsIgnoreCase(parentPath)) {
       return;
     }
 
@@ -79,7 +79,7 @@ public class RecoveringRegionWatcher extends ZooKeeperListener {
    */
   private void registerWatcher(String path) {
     String parentPath = path.substring(0, path.lastIndexOf('/'));
-    if (!this.watcher.recoveringRegionsZNode.equalsIgnoreCase(parentPath)) {
+    if (!this.watcher.znodePaths.recoveringRegionsZNode.equalsIgnoreCase(parentPath)) {
       return;
     }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.java
index 40ee549..a993934 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.java
@@ -37,7 +37,7 @@ public class RegionNormalizerTracker extends ZooKeeperNodeTracker {
 
   public RegionNormalizerTracker(ZooKeeperWatcher watcher,
                              Abortable abortable) {
-    super(watcher, watcher.getRegionNormalizerZNode(), abortable);
+    super(watcher, watcher.znodePaths.regionNormalizerZNode, abortable);
   }
 
   /**
@@ -64,11 +64,11 @@ public class RegionNormalizerTracker extends ZooKeeperNodeTracker {
   public void setNormalizerOn(boolean normalizerOn) throws KeeperException {
     byte [] upData = toByteArray(normalizerOn);
     try {
-      ZKUtil.setData(watcher, watcher.getRegionNormalizerZNode(), upData);
+      ZKUtil.setData(watcher, watcher.znodePaths.regionNormalizerZNode, upData);
     } catch(KeeperException.NoNodeException nne) {
-      ZKUtil.createAndWatch(watcher, watcher.getRegionNormalizerZNode(), upData);
+      ZKUtil.createAndWatch(watcher, watcher.znodePaths.regionNormalizerZNode, upData);
     }
-    super.nodeDataChanged(watcher.getRegionNormalizerZNode());
+    super.nodeDataChanged(watcher.znodePaths.regionNormalizerZNode);
   }
 
   private byte [] toByteArray(boolean isNormalizerOn) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
index f0f52e0..19d2d00 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
@@ -71,7 +71,7 @@ public class RegionServerTracker extends ZooKeeperListener {
   public void start() throws KeeperException, IOException {
     watcher.registerListener(this);
     List<String> servers =
-      ZKUtil.listChildrenAndWatchThem(watcher, watcher.rsZNode);
+      ZKUtil.listChildrenAndWatchThem(watcher, watcher.znodePaths.rsZNode);
     add(servers);
   }
 
@@ -83,7 +83,7 @@ public class RegionServerTracker extends ZooKeeperListener {
         if (regionServers.get(sn) == null) {
           RegionServerInfo.Builder rsInfoBuilder = RegionServerInfo.newBuilder();
           try {
-            String nodePath = ZKUtil.joinZNode(watcher.rsZNode, n);
+            String nodePath = ZKUtil.joinZNode(watcher.znodePaths.rsZNode, n);
             byte[] data = ZKUtil.getData(watcher, nodePath);
             if (data != null && data.length > 0 && ProtobufUtil.isPBMagicPrefix(data)) {
               int magicLen = ProtobufUtil.lengthOfPBMagic();
@@ -113,7 +113,7 @@ public class RegionServerTracker extends ZooKeeperListener {
 
   @Override
   public void nodeDeleted(String path) {
-    if (path.startsWith(watcher.rsZNode)) {
+    if (path.startsWith(watcher.znodePaths.rsZNode)) {
       String serverName = ZKUtil.getNodeName(path);
       LOG.info("RegionServer ephemeral node deleted, processing expiration [" +
         serverName + "]");
@@ -130,11 +130,11 @@ public class RegionServerTracker extends ZooKeeperListener {
 
   @Override
   public void nodeChildrenChanged(String path) {
-    if (path.equals(watcher.rsZNode)
+    if (path.equals(watcher.znodePaths.rsZNode)
         && !server.isAborted() && !server.isStopped()) {
       try {
         List<String> servers =
-          ZKUtil.listChildrenAndWatchThem(watcher, watcher.rsZNode);
+          ZKUtil.listChildrenAndWatchThem(watcher, watcher.znodePaths.rsZNode);
         add(servers);
       } catch (IOException e) {
         server.abort("Unexpected zk exception getting RS nodes", e);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/SplitOrMergeTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/SplitOrMergeTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/SplitOrMergeTracker.java
index 4cc3866..a87f916 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/SplitOrMergeTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/SplitOrMergeTracker.java
@@ -46,15 +46,15 @@ public class SplitOrMergeTracker {
   public SplitOrMergeTracker(ZooKeeperWatcher watcher, Configuration conf,
                              Abortable abortable) {
     try {
-      if (ZKUtil.checkExists(watcher, watcher.getSwitchZNode()) < 0) {
-        ZKUtil.createAndFailSilent(watcher, watcher.getSwitchZNode());
+      if (ZKUtil.checkExists(watcher, watcher.znodePaths.switchZNode) < 0) {
+        ZKUtil.createAndFailSilent(watcher, watcher.znodePaths.switchZNode);
       }
     } catch (KeeperException e) {
       throw new RuntimeException(e);
     }
-    splitZnode = ZKUtil.joinZNode(watcher.getSwitchZNode(),
+    splitZnode = ZKUtil.joinZNode(watcher.znodePaths.switchZNode,
       conf.get("zookeeper.znode.switch.split", "split"));
-    mergeZnode = ZKUtil.joinZNode(watcher.getSwitchZNode(),
+    mergeZnode = ZKUtil.joinZNode(watcher.znodePaths.switchZNode,
       conf.get("zookeeper.znode.switch.merge", "merge"));
     splitStateTracker = new SwitchStateTracker(watcher, splitZnode, abortable);
     mergeStateTracker = new SwitchStateTracker(watcher, mergeZnode, abortable);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKSplitLog.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKSplitLog.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKSplitLog.java
index 5e775f2..1247253 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKSplitLog.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKSplitLog.java
@@ -50,7 +50,7 @@ public class ZKSplitLog {
    * @param filename log file name (only the basename)
    */
   public static String getEncodedNodeName(ZooKeeperWatcher zkw, String filename) {
-    return ZKUtil.joinZNode(zkw.splitLogZNode, encode(filename));
+    return ZKUtil.joinZNode(zkw.znodePaths.splitLogZNode, encode(filename));
   }
 
   public static String getFileName(String node) {
@@ -75,7 +75,7 @@ public class ZKSplitLog {
   }
 
   public static String getRescanNode(ZooKeeperWatcher zkw) {
-    return ZKUtil.joinZNode(zkw.splitLogZNode, "RESCAN");
+    return ZKUtil.joinZNode(zkw.znodePaths.splitLogZNode, "RESCAN");
   }
 
   /**
@@ -106,7 +106,7 @@ public class ZKSplitLog {
 
   public static boolean isTaskPath(ZooKeeperWatcher zkw, String path) {
     String dirname = path.substring(0, path.lastIndexOf('/'));
-    return dirname.equals(zkw.splitLogZNode);
+    return dirname.equals(zkw.znodePaths.splitLogZNode);
   }
 
   public static Path getSplitLogDir(Path rootdir, String tmpname) {
@@ -153,7 +153,7 @@ public class ZKSplitLog {
       isRegionMarkedRecoveringInZK(ZooKeeperWatcher zkw, String regionEncodedName)
           throws KeeperException {
     boolean result = false;
-    String nodePath = ZKUtil.joinZNode(zkw.recoveringRegionsZNode, regionEncodedName);
+    String nodePath = ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode, regionEncodedName);
 
     byte[] node = ZKUtil.getDataAndWatch(zkw, nodePath);
     if (node != null) {
@@ -182,10 +182,10 @@ public class ZKSplitLog {
       if (regions == null) {
         // remove all children under /home/recovering-regions
         LOG.debug("Garbage collecting all recovering region znodes");
-        ZKUtil.deleteChildrenRecursively(watcher, watcher.recoveringRegionsZNode);
+        ZKUtil.deleteChildrenRecursively(watcher, watcher.znodePaths.recoveringRegionsZNode);
       } else {
         for (String curRegion : regions) {
-          String nodePath = ZKUtil.joinZNode(watcher.recoveringRegionsZNode, curRegion);
+          String nodePath = ZKUtil.joinZNode(watcher.znodePaths.recoveringRegionsZNode, curRegion);
           ZKUtil.deleteNodeRecursively(watcher, nodePath);
         }
       }
@@ -213,7 +213,7 @@ public class ZKSplitLog {
     // Therefore, in this mode we need to fetch last sequence Ids from ZK where we keep history of
     // last flushed sequence Id for each failed RS instance.
     RegionStoreSequenceIds result = null;
-    String nodePath = ZKUtil.joinZNode(zkw.recoveringRegionsZNode, encodedRegionName);
+    String nodePath = ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode, encodedRegionName);
     nodePath = ZKUtil.joinZNode(nodePath, serverName);
     try {
       byte[] data;

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
index 68a6a50..721391a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java
@@ -131,7 +131,7 @@ public class TestMetaWithReplicas {
     for (int i = 1; i < 3; i++) {
       String secZnode = ZKUtil.joinZNode(baseZNode,
           conf.get("zookeeper.znode.metaserver", "meta-region-server") + "-" + i);
-      String str = zkw.getZNodeForReplica(i);
+      String str = zkw.znodePaths.getZNodeForReplica(i);
       assertTrue(str.equals(secZnode));
       // check that the data in the znode is parseable (this would also mean the znode exists)
       data = ZKUtil.getData(zkw, secZnode);
@@ -353,7 +353,7 @@ public class TestMetaWithReplicas {
     HBaseFsckRepair.closeRegionSilentlyAndWait(c,
         rl.getRegionLocation(2).getServerName(), rl.getRegionLocation(2).getRegionInfo());
     ZooKeeperWatcher zkw = TEST_UTIL.getZooKeeperWatcher();
-    ZKUtil.deleteNode(zkw, zkw.getZNodeForReplica(2));
+    ZKUtil.deleteNode(zkw, zkw.znodePaths.getZNodeForReplica(2));
     // check that problem exists
     HBaseFsck hbck = doFsck(TEST_UTIL.getConfiguration(), false);
     assertErrors(hbck, new ERROR_CODE[]{ERROR_CODE.UNKNOWN,ERROR_CODE.NO_META_REGION});

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java
index e10ab2a..f2f35a9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java
@@ -72,8 +72,8 @@ public class TestActiveMasterManager {
     ZooKeeperWatcher zk = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
       "testActiveMasterManagerFromZK", null, true);
     try {
-      ZKUtil.deleteNode(zk, zk.getMasterAddressZNode());
-      ZKUtil.deleteNode(zk, zk.clusterStateZNode);
+      ZKUtil.deleteNode(zk, zk.znodePaths.masterAddressZNode);
+      ZKUtil.deleteNode(zk, zk.znodePaths.clusterStateZNode);
     } catch(KeeperException.NoNodeException nne) {}
 
     // Create the master node with a dummy address
@@ -114,8 +114,8 @@ public class TestActiveMasterManager {
     ZooKeeperWatcher zk = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
       "testActiveMasterManagerFromZK", null, true);
     try {
-      ZKUtil.deleteNode(zk, zk.getMasterAddressZNode());
-      ZKUtil.deleteNode(zk, zk.clusterStateZNode);
+      ZKUtil.deleteNode(zk, zk.znodePaths.masterAddressZNode);
+      ZKUtil.deleteNode(zk, zk.znodePaths.clusterStateZNode);
     } catch(KeeperException.NoNodeException nne) {}
 
     // Create the master node with a dummy address
@@ -160,11 +160,11 @@ public class TestActiveMasterManager {
     ms1.stop("stopping first server");
 
     // Use a listener to capture when the node is actually deleted
-    NodeDeletionListener listener = new NodeDeletionListener(zk, zk.getMasterAddressZNode());
+    NodeDeletionListener listener = new NodeDeletionListener(zk, zk.znodePaths.masterAddressZNode);
     zk.registerListener(listener);
 
     LOG.info("Deleting master node");
-    ZKUtil.deleteNode(zk, zk.getMasterAddressZNode());
+    ZKUtil.deleteNode(zk, zk.znodePaths.masterAddressZNode);
 
     // Wait for the node to be deleted
     LOG.info("Waiting for active master manager to be notified");
@@ -184,7 +184,7 @@ public class TestActiveMasterManager {
     assertTrue(t.isActiveMaster);
 
     LOG.info("Deleting master node");
-    ZKUtil.deleteNode(zk, zk.getMasterAddressZNode());
+    ZKUtil.deleteNode(zk, zk.znodePaths.masterAddressZNode);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
index 1359e1c..f1b559f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
@@ -459,7 +459,7 @@ public class TestDistributedLogSplitting {
       @Override
       public boolean evaluate() throws Exception {
         List<String> recoveringRegions = zkw.getRecoverableZooKeeper().getChildren(
-            zkw.recoveringRegionsZNode, false);
+            zkw.znodePaths.recoveringRegionsZNode, false);
         return (recoveringRegions != null && recoveringRegions.size() == 0);
       }
     });
@@ -566,7 +566,7 @@ public class TestDistributedLogSplitting {
         @Override
         public boolean evaluate() throws Exception {
           List<String> recoveringRegions = zkw.getRecoverableZooKeeper().getChildren(
-              zkw.recoveringRegionsZNode, false);
+              zkw.znodePaths.recoveringRegionsZNode, false);
           boolean done = recoveringRegions != null && recoveringRegions.size() == 0;
           if (!done) {
             LOG.info("Recovering regions: " + recoveringRegions);
@@ -658,7 +658,7 @@ public class TestDistributedLogSplitting {
         @Override
         public boolean evaluate() throws Exception {
           List<String> recoveringRegions = zkw.getRecoverableZooKeeper().getChildren(
-              zkw.recoveringRegionsZNode, false);
+              zkw.znodePaths.recoveringRegionsZNode, false);
           return (recoveringRegions != null && recoveringRegions.size() == 0);
         }
       });
@@ -702,7 +702,7 @@ public class TestDistributedLogSplitting {
       slm.markRegionsRecovering(secondFailedServer, regionSet);
 
       List<String> recoveringRegions = ZKUtil.listChildrenNoWatch(zkw,
-          ZKUtil.joinZNode(zkw.recoveringRegionsZNode, region.getEncodedName()));
+          ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode, region.getEncodedName()));
 
       assertEquals(recoveringRegions.size(), 2);
 
@@ -859,7 +859,7 @@ public class TestDistributedLogSplitting {
         @Override
         public boolean evaluate() throws Exception {
           List<String> recoveringRegions = zkw.getRecoverableZooKeeper().getChildren(
-              zkw.recoveringRegionsZNode, false);
+              zkw.znodePaths.recoveringRegionsZNode, false);
           ServerManager serverManager = master.getServerManager();
           return (!serverManager.areDeadServersInProgress() &&
               recoveringRegions != null && recoveringRegions.size() == 0);
@@ -1104,7 +1104,7 @@ public class TestDistributedLogSplitting {
         @Override
         public boolean evaluate() throws Exception {
           List<String> recoveringRegions = zkw.getRecoverableZooKeeper().getChildren(
-              zkw.recoveringRegionsZNode, false);
+              zkw.znodePaths.recoveringRegionsZNode, false);
           return (recoveringRegions != null && recoveringRegions.size() == 0);
         }
       });
@@ -1210,7 +1210,7 @@ public class TestDistributedLogSplitting {
     master.getMasterWalManager().prepareLogReplay(hrs.getServerName(), userRegionSet);
     boolean isMetaRegionInRecovery = false;
     List<String> recoveringRegions =
-        zkw.getRecoverableZooKeeper().getChildren(zkw.recoveringRegionsZNode, false);
+        zkw.getRecoverableZooKeeper().getChildren(zkw.znodePaths.recoveringRegionsZNode, false);
     for (String curEncodedRegionName : recoveringRegions) {
       if (curEncodedRegionName.equals(HRegionInfo.FIRST_META_REGIONINFO.getEncodedName())) {
         isMetaRegionInRecovery = true;
@@ -1223,7 +1223,7 @@ public class TestDistributedLogSplitting {
 
     isMetaRegionInRecovery = false;
     recoveringRegions =
-        zkw.getRecoverableZooKeeper().getChildren(zkw.recoveringRegionsZNode, false);
+        zkw.getRecoverableZooKeeper().getChildren(zkw.znodePaths.recoveringRegionsZNode, false);
     for (String curEncodedRegionName : recoveringRegions) {
       if (curEncodedRegionName.equals(HRegionInfo.FIRST_META_REGIONINFO.getEncodedName())) {
         isMetaRegionInRecovery = true;

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
index 6b3502d..8cb3ec8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
@@ -70,7 +70,7 @@ public class TestHMasterRPCException {
 
     CoordinatedStateManager cp = CoordinatedStateManagerFactory.getCoordinatedStateManager(conf);
     ZooKeeperWatcher watcher = testUtil.getZooKeeperWatcher();
-    ZKUtil.createWithParents(watcher, watcher.getMasterAddressZNode(), Bytes.toBytes("fake:123"));
+    ZKUtil.createWithParents(watcher, watcher.znodePaths.masterAddressZNode, Bytes.toBytes("fake:123"));
     master = new HMaster(conf, cp);
     rpcClient = RpcClientFactory.createClient(conf, HConstants.CLUSTER_ID_DEFAULT);
   }
@@ -107,11 +107,11 @@ public class TestHMasterRPCException {
         LOG.info("Expected exception: ", ie);
         if (!fakeZNodeDelete) {
           testUtil.getZooKeeperWatcher().getRecoverableZooKeeper()
-              .delete(testUtil.getZooKeeperWatcher().getMasterAddressZNode(), -1);
+              .delete(testUtil.getZooKeeperWatcher().znodePaths.masterAddressZNode, -1);
           fakeZNodeDelete = true;
         }
       }
       Thread.sleep(1000);
     }
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java
index f2eecd8..7f2fb08 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java
@@ -114,7 +114,7 @@ public class TestMasterNoCluster {
         return false;
       }
     });
-    ZKUtil.deleteNodeRecursively(zkw, zkw.baseZNode);
+    ZKUtil.deleteNodeRecursively(zkw, zkw.znodePaths.baseZNode);
     zkw.close();
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
index c10ffda..af54ffc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
+import org.apache.hadoop.hbase.zookeeper.ZNodePaths;
 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
 import org.apache.hadoop.hbase.regionserver.MetricsRegionServer;
 import org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapperStub;
@@ -98,6 +99,7 @@ public class TestMasterStatusServlet {
 
     // Fake ZKW
     ZooKeeperWatcher zkw = Mockito.mock(ZooKeeperWatcher.class);
+    Mockito.doReturn(new ZNodePaths(conf)).when(zkw).getZNodePaths();
     Mockito.doReturn("fakequorum").when(zkw).getQuorum();
     Mockito.doReturn(zkw).when(master).getZooKeeper();
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterWalManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterWalManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterWalManager.java
index feb97d9..7c7531f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterWalManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterWalManager.java
@@ -83,9 +83,10 @@ public class TestMasterWalManager {
     zkw.getRecoverableZooKeeper().create(ZKSplitLog.getEncodedNodeName(zkw, walPath),
       new SplitLogTask.Owned(inRecoveryServerName, mwm.getLogRecoveryMode()).toByteArray(),
         Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-    String staleRegionPath = ZKUtil.joinZNode(zkw.recoveringRegionsZNode, staleRegion);
+    String staleRegionPath = ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode, staleRegion);
     ZKUtil.createWithParents(zkw, staleRegionPath);
-    String inRecoveringRegionPath = ZKUtil.joinZNode(zkw.recoveringRegionsZNode, failedRegion);
+    String inRecoveringRegionPath = ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode,
+      failedRegion);
     inRecoveringRegionPath = ZKUtil.joinZNode(inRecoveringRegionPath,
       inRecoveryServerName.getServerName());
     ZKUtil.createWithParents(zkw, inRecoveringRegionPath);
@@ -97,8 +98,8 @@ public class TestMasterWalManager {
     assertFalse(ZKUtil.checkExists(zkw, staleRegionPath) != -1);
     assertTrue(ZKUtil.checkExists(zkw, inRecoveringRegionPath) != -1);
 
-    ZKUtil.deleteChildrenRecursively(zkw, zkw.recoveringRegionsZNode);
-    ZKUtil.deleteChildrenRecursively(zkw, zkw.splitLogZNode);
+    ZKUtil.deleteChildrenRecursively(zkw, zkw.znodePaths.recoveringRegionsZNode);
+    ZKUtil.deleteChildrenRecursively(zkw, zkw.znodePaths.splitLogZNode);
     zkw.close();
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
index 619d367..a845a73 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
@@ -94,7 +94,7 @@ public class TestMetaShutdownHandler {
     // Delete the ephemeral node of the meta-carrying region server.
     // This is trigger the expire of this region server on the master.
     String rsEphemeralNodePath =
-        ZKUtil.joinZNode(master.getZooKeeper().rsZNode, metaServerName.toString());
+        ZKUtil.joinZNode(master.getZooKeeper().znodePaths.rsZNode, metaServerName.toString());
     ZKUtil.deleteNode(master.getZooKeeper(), rsEphemeralNodePath);
     // Wait for SSH to finish
     final ServerManager serverManager = master.getServerManager();

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
index 748d6b2..8791e3e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
@@ -134,13 +134,13 @@ public class TestSplitLogManager {
         new ZooKeeperWatcher(conf, "split-log-manager-tests" + UUID.randomUUID().toString(), null);
     master = new DummyMasterServices(zkw, conf);
 
-    ZKUtil.deleteChildrenRecursively(zkw, zkw.baseZNode);
-    ZKUtil.createAndFailSilent(zkw, zkw.baseZNode);
-    assertTrue(ZKUtil.checkExists(zkw, zkw.baseZNode) != -1);
-    LOG.debug(zkw.baseZNode + " created");
-    ZKUtil.createAndFailSilent(zkw, zkw.splitLogZNode);
-    assertTrue(ZKUtil.checkExists(zkw, zkw.splitLogZNode) != -1);
-    LOG.debug(zkw.splitLogZNode + " created");
+    ZKUtil.deleteChildrenRecursively(zkw, zkw.znodePaths.baseZNode);
+    ZKUtil.createAndFailSilent(zkw, zkw.znodePaths.baseZNode);
+    assertTrue(ZKUtil.checkExists(zkw, zkw.znodePaths.baseZNode) != -1);
+    LOG.debug(zkw.znodePaths.baseZNode + " created");
+    ZKUtil.createAndFailSilent(zkw, zkw.znodePaths.splitLogZNode);
+    assertTrue(ZKUtil.checkExists(zkw, zkw.znodePaths.splitLogZNode) != -1);
+    LOG.debug(zkw.znodePaths.splitLogZNode + " created");
 
     resetCounters();
 
@@ -567,7 +567,7 @@ public class TestSplitLogManager {
     LOG.info("testRecoveryRegionRemovedFromZK");
     conf.setBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY, false);
     String nodePath =
-        ZKUtil.joinZNode(zkw.recoveringRegionsZNode,
+        ZKUtil.joinZNode(zkw.znodePaths.recoveringRegionsZNode,
           HRegionInfo.FIRST_META_REGIONINFO.getEncodedName());
     ZKUtil.createSetData(zkw, nodePath, ZKUtil.positionToByteArray(0L));
 
@@ -575,7 +575,7 @@ public class TestSplitLogManager {
     slm.removeStaleRecoveringRegions(null);
 
     List<String> recoveringRegions =
-        zkw.getRecoverableZooKeeper().getChildren(zkw.recoveringRegionsZNode, false);
+        zkw.getRecoverableZooKeeper().getChildren(zkw.znodePaths.recoveringRegionsZNode, false);
 
     assertTrue("Recovery regions isn't cleaned", recoveringRegions.isEmpty());
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
index 36f505b..7426437 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableLockManager.java
@@ -220,7 +220,8 @@ public class TestTableLockManager {
 
     //ensure that znode for the table node has been deleted
     final ZooKeeperWatcher zkWatcher = TEST_UTIL.getZooKeeperWatcher();
-    final String znode = ZKUtil.joinZNode(zkWatcher.tableLockZNode, TABLE_NAME.getNameAsString());
+    final String znode = ZKUtil.joinZNode(zkWatcher.znodePaths.tableLockZNode,
+      TABLE_NAME.getNameAsString());
 
     TEST_UTIL.waitFor(5000, new Waiter.Predicate<Exception>() {
       @Override
@@ -230,7 +231,7 @@ public class TestTableLockManager {
       }
     });
     int ver = ZKUtil.checkExists(zkWatcher,
-      ZKUtil.joinZNode(zkWatcher.tableLockZNode, TABLE_NAME.getNameAsString()));
+      ZKUtil.joinZNode(zkWatcher.znodePaths.tableLockZNode, TABLE_NAME.getNameAsString()));
     assertTrue("Unexpected znode version " + ver, ver < 0);
 
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableStateManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableStateManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableStateManager.java
index f0c76b0..e6ce394 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableStateManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestTableStateManager.java
@@ -68,7 +68,7 @@ public class TestTableStateManager {
   private void setTableStateInZK(ZooKeeperWatcher watcher, final TableName tableName,
       final ZooKeeperProtos.DeprecatedTableState.State state)
       throws KeeperException, IOException {
-    String znode = ZKUtil.joinZNode(watcher.tableZNode, tableName.getNameAsString());
+    String znode = ZKUtil.joinZNode(watcher.znodePaths.tableZNode, tableName.getNameAsString());
     if (ZKUtil.checkExists(watcher, znode) == -1) {
       ZKUtil.createAndFailSilent(watcher, znode);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepMapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepMapper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepMapper.java
index cec8a74..44131ba 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepMapper.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepMapper.java
@@ -79,7 +79,7 @@ public class TestMobSweepMapper {
     ZooKeeperWatcher zkw = new ZooKeeperWatcher(configuration, "1", new DummyMobAbortable());
     TableName tn = TableName.valueOf("testSweepMapper");
     TableName lockName = MobUtils.getTableLockName(tn);
-    String znode = ZKUtil.joinZNode(zkw.tableLockZNode, lockName.getNameAsString());
+    String znode = ZKUtil.joinZNode(zkw.znodePaths.tableLockZNode, lockName.getNameAsString());
     configuration.set(SweepJob.SWEEP_JOB_ID, "1");
     configuration.set(SweepJob.SWEEP_JOB_TABLE_NODE, znode);
     ServerName serverName = SweepJob.getCurrentServerName(configuration);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepReducer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepReducer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepReducer.java
index 8cef4d9..abe0d3a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepReducer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/mapreduce/TestMobSweepReducer.java
@@ -162,7 +162,7 @@ public class TestMobSweepReducer {
 
     ZooKeeperWatcher zkw = new ZooKeeperWatcher(configuration, "1", new DummyMobAbortable());
     TableName lockName = MobUtils.getTableLockName(tn);
-    String znode = ZKUtil.joinZNode(zkw.tableLockZNode, lockName.getNameAsString());
+    String znode = ZKUtil.joinZNode(zkw.znodePaths.tableLockZNode, lockName.getNameAsString());
     configuration.set(SweepJob.SWEEP_JOB_ID, "1");
     configuration.set(SweepJob.SWEEP_JOB_TABLE_NODE, znode);
     ServerName serverName = SweepJob.getCurrentServerName(configuration);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressTracker.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressTracker.java
index 487bb25..84865cc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressTracker.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMasterAddressTracker.java
@@ -82,7 +82,7 @@ public class TestMasterAddressTracker {
       throws Exception {
     ZooKeeperWatcher zk = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
         name.getMethodName(), null);
-    ZKUtil.createAndFailSilent(zk, zk.baseZNode);
+    ZKUtil.createAndFailSilent(zk, zk.znodePaths.baseZNode);
 
     // Should not have a master yet
     MasterAddressTracker addressTracker = new MasterAddressTracker(zk, null);
@@ -91,12 +91,12 @@ public class TestMasterAddressTracker {
     zk.registerListener(addressTracker);
 
     // Use a listener to capture when the node is actually created
-    NodeCreationListener listener = new NodeCreationListener(zk, zk.getMasterAddressZNode());
+    NodeCreationListener listener = new NodeCreationListener(zk, zk.znodePaths.masterAddressZNode);
     zk.registerListener(listener);
 
     if (sn != null) {
       LOG.info("Creating master node");
-      MasterAddressTracker.setMasterAddress(zk, zk.getMasterAddressZNode(), sn, infoPort);
+      MasterAddressTracker.setMasterAddress(zk, zk.znodePaths.masterAddressZNode, sn, infoPort);
 
       // Wait for the node to be created
       LOG.info("Waiting for master address manager to be notified");

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java
index c48fbec..63e33d4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerHostname.java
@@ -88,7 +88,7 @@ public class TestRegionServerHostname {
         TEST_UTIL.startMiniCluster(NUM_MASTERS, NUM_RS);
         try {
           ZooKeeperWatcher zkw = TEST_UTIL.getZooKeeperWatcher();
-          List<String> servers = ZKUtil.listChildrenNoWatch(zkw, zkw.rsZNode);
+          List<String> servers = ZKUtil.listChildrenNoWatch(zkw, zkw.znodePaths.rsZNode);
           // there would be NUM_RS+1 children - one for the master
           assertTrue(servers.size() == NUM_RS+1);
           for (String server : servers) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
index b5e3c30..18df013 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
@@ -188,16 +188,16 @@ public class TestSplitLogWorker {
     zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
         "split-log-worker-tests", null);
     ds = new DummyServer(zkw, conf);
-    ZKUtil.deleteChildrenRecursively(zkw, zkw.baseZNode);
-    ZKUtil.createAndFailSilent(zkw, zkw.baseZNode);
-    assertThat(ZKUtil.checkExists(zkw, zkw.baseZNode), not (is(-1)));
-    LOG.debug(zkw.baseZNode + " created");
-    ZKUtil.createAndFailSilent(zkw, zkw.splitLogZNode);
-    assertThat(ZKUtil.checkExists(zkw, zkw.splitLogZNode), not (is(-1)));
+    ZKUtil.deleteChildrenRecursively(zkw, zkw.znodePaths.baseZNode);
+    ZKUtil.createAndFailSilent(zkw, zkw.znodePaths.baseZNode);
+    assertThat(ZKUtil.checkExists(zkw, zkw.znodePaths.baseZNode), not (is(-1)));
+    LOG.debug(zkw.znodePaths.baseZNode + " created");
+    ZKUtil.createAndFailSilent(zkw, zkw.znodePaths.splitLogZNode);
+    assertThat(ZKUtil.checkExists(zkw, zkw.znodePaths.splitLogZNode), not (is(-1)));
 
-    LOG.debug(zkw.splitLogZNode + " created");
-    ZKUtil.createAndFailSilent(zkw, zkw.rsZNode);
-    assertThat(ZKUtil.checkExists(zkw, zkw.rsZNode), not (is(-1)));
+    LOG.debug(zkw.znodePaths.splitLogZNode + " created");
+    ZKUtil.createAndFailSilent(zkw, zkw.znodePaths.rsZNode);
+    assertThat(ZKUtil.checkExists(zkw, zkw.znodePaths.rsZNode), not (is(-1)));
 
     SplitLogCounters.resetCounters();
     executorService = new ExecutorService("TestSplitLogWorker");
@@ -416,7 +416,7 @@ public class TestSplitLogWorker {
     waitForCounter(SplitLogCounters.tot_wkr_preempt_task, 1, 2, WAIT_TIME);
     waitForCounter(SplitLogCounters.tot_wkr_task_acquired_rescan, 0, 1, WAIT_TIME);
 
-    List<String> nodes = ZKUtil.listChildrenNoWatch(zkw, zkw.splitLogZNode);
+    List<String> nodes = ZKUtil.listChildrenNoWatch(zkw, zkw.znodePaths.splitLogZNode);
     LOG.debug(nodes);
     int num = 0;
     for (String node : nodes) {
@@ -424,7 +424,7 @@ public class TestSplitLogWorker {
       if (node.startsWith("RESCAN")) {
         String name = ZKSplitLog.getEncodedNodeName(zkw, node);
         String fn = ZKSplitLog.getFileName(name);
-        byte [] data = ZKUtil.getData(zkw, ZKUtil.joinZNode(zkw.splitLogZNode, fn));
+        byte [] data = ZKUtil.getData(zkw, ZKUtil.joinZNode(zkw.znodePaths.splitLogZNode, fn));
         slt = SplitLogTask.parseFrom(data);
         assertTrue(slt.toString(), slt.isDone(SRV));
       }
@@ -480,9 +480,9 @@ public class TestSplitLogWorker {
     RegionServerServices mockedRS = getRegionServer(RS);
 
     // create two RS nodes
-    String rsPath = ZKUtil.joinZNode(zkw.rsZNode, RS.getServerName());
+    String rsPath = ZKUtil.joinZNode(zkw.znodePaths.rsZNode, RS.getServerName());
     zkw.getRecoverableZooKeeper().create(rsPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
-    rsPath = ZKUtil.joinZNode(zkw.rsZNode, RS2.getServerName());
+    rsPath = ZKUtil.joinZNode(zkw.znodePaths.rsZNode, RS2.getServerName());
     zkw.getRecoverableZooKeeper().create(rsPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
 
     for (int i = 0; i < maxTasks; i++) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateHBaseImpl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateHBaseImpl.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateHBaseImpl.java
index 35c4e24..3685d6d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateHBaseImpl.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateHBaseImpl.java
@@ -87,7 +87,7 @@ public class TestReplicationStateHBaseImpl {
     utility.startMiniCluster();
     zkw = HBaseTestingUtility.getZooKeeperWatcher(utility);
     String replicationZNodeName = conf.get("zookeeper.znode.replication", "replication");
-    replicationZNode = ZKUtil.joinZNode(zkw.baseZNode, replicationZNodeName);
+    replicationZNode = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, replicationZNodeName);
   }
 
   @Before

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateZKImpl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateZKImpl.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateZKImpl.java
index a357a1f..fc35b54 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateZKImpl.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationStateZKImpl.java
@@ -68,7 +68,7 @@ public class TestReplicationStateZKImpl extends TestReplicationStateBasic {
     conf.setBoolean(HConstants.REPLICATION_BULKLOAD_ENABLE_KEY, true);
     zkw = HBaseTestingUtility.getZooKeeperWatcher(utility);
     String replicationZNodeName = conf.get("zookeeper.znode.replication", "replication");
-    replicationZNode = ZKUtil.joinZNode(zkw.baseZNode, replicationZNodeName);
+    replicationZNode = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, replicationZNodeName);
     KEY_ONE = initPeerClusterState("/hbase1");
     KEY_TWO = initPeerClusterState("/hbase2");
   }
@@ -79,7 +79,7 @@ public class TestReplicationStateZKImpl extends TestReplicationStateBasic {
     Configuration testConf = new Configuration(conf);
     testConf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, baseZKNode);
     ZooKeeperWatcher zkw1 = new ZooKeeperWatcher(testConf, "test1", null);
-    String fakeRs = ZKUtil.joinZNode(zkw1.rsZNode, "hostname1.example.org:1234");
+    String fakeRs = ZKUtil.joinZNode(zkw1.znodePaths.rsZNode, "hostname1.example.org:1234");
     ZKUtil.createWithParents(zkw1, fakeRs);
     ZKClusterId.setClusterId(zkw1, new ClusterId());
     return ZKConfig.getZooKeeperClusterKey(testConf);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java
index 3b19660..0222513 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java
@@ -81,13 +81,13 @@ public class TestReplicationTrackerZKImpl {
     utility.startMiniZKCluster();
     conf = utility.getConfiguration();
     ZooKeeperWatcher zk = HBaseTestingUtility.getZooKeeperWatcher(utility);
-    ZKUtil.createWithParents(zk, zk.rsZNode);
+    ZKUtil.createWithParents(zk, zk.znodePaths.rsZNode);
   }
 
   @Before
   public void setUp() throws Exception {
     zkw = HBaseTestingUtility.getZooKeeperWatcher(utility);
-    String fakeRs1 = ZKUtil.joinZNode(zkw.rsZNode, "hostname1.example.org:1234");
+    String fakeRs1 = ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname1.example.org:1234");
     try {
       ZKClusterId.setClusterId(zkw, new ClusterId());
       rp = ReplicationFactory.getReplicationPeers(zkw, conf, zkw);
@@ -115,29 +115,32 @@ public class TestReplicationTrackerZKImpl {
     assertEquals(0, rt.getListOfRegionServers().size());
 
     // 1 region server
-    ZKUtil.createWithParents(zkw, ZKUtil.joinZNode(zkw.rsZNode, "hostname1.example.org:1234"));
+    ZKUtil.createWithParents(zkw,
+      ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname1.example.org:1234"));
     assertEquals(1, rt.getListOfRegionServers().size());
 
     // 2 region servers
-    ZKUtil.createWithParents(zkw, ZKUtil.joinZNode(zkw.rsZNode, "hostname2.example.org:1234"));
+    ZKUtil.createWithParents(zkw,
+      ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname2.example.org:1234"));
     assertEquals(2, rt.getListOfRegionServers().size());
 
     // 1 region server
-    ZKUtil.deleteNode(zkw, ZKUtil.joinZNode(zkw.rsZNode, "hostname2.example.org:1234"));
+    ZKUtil.deleteNode(zkw, ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname2.example.org:1234"));
     assertEquals(1, rt.getListOfRegionServers().size());
 
     // 0 region server
-    ZKUtil.deleteNode(zkw, ZKUtil.joinZNode(zkw.rsZNode, "hostname1.example.org:1234"));
+    ZKUtil.deleteNode(zkw, ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname1.example.org:1234"));
     assertEquals(0, rt.getListOfRegionServers().size());
   }
 
   @Test(timeout = 30000)
   public void testRegionServerRemovedEvent() throws Exception {
-    ZKUtil.createAndWatch(zkw, ZKUtil.joinZNode(zkw.rsZNode, "hostname2.example.org:1234"),
+    ZKUtil.createAndWatch(zkw,
+      ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname2.example.org:1234"),
       HConstants.EMPTY_BYTE_ARRAY);
     rt.registerListener(new DummyReplicationListener());
     // delete one
-    ZKUtil.deleteNode(zkw, ZKUtil.joinZNode(zkw.rsZNode, "hostname2.example.org:1234"));
+    ZKUtil.deleteNode(zkw, ZKUtil.joinZNode(zkw.znodePaths.rsZNode, "hostname2.example.org:1234"));
     // wait for event
     while (rsRemovedCount.get() < 1) {
       Thread.sleep(5);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKMulti.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKMulti.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKMulti.java
index 43d7139..6350af8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKMulti.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZKMulti.java
@@ -88,7 +88,7 @@ public class TestZKMulti {
     ZKUtil.multiOrSequential(zkw, new LinkedList<ZKUtilOp>(), false);
 
     // single create
-    String path = ZKUtil.joinZNode(zkw.baseZNode, "testSimpleMulti");
+    String path = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testSimpleMulti");
     LinkedList<ZKUtilOp> singleCreate = new LinkedList<ZKUtilOp>();
     singleCreate.add(ZKUtilOp.createAndFailSilent(path, new byte[0]));
     ZKUtil.multiOrSequential(zkw, singleCreate, false);
@@ -110,12 +110,12 @@ public class TestZKMulti {
 
   @Test (timeout=60000)
   public void testComplexMulti() throws Exception {
-    String path1 = ZKUtil.joinZNode(zkw.baseZNode, "testComplexMulti1");
-    String path2 = ZKUtil.joinZNode(zkw.baseZNode, "testComplexMulti2");
-    String path3 = ZKUtil.joinZNode(zkw.baseZNode, "testComplexMulti3");
-    String path4 = ZKUtil.joinZNode(zkw.baseZNode, "testComplexMulti4");
-    String path5 = ZKUtil.joinZNode(zkw.baseZNode, "testComplexMulti5");
-    String path6 = ZKUtil.joinZNode(zkw.baseZNode, "testComplexMulti6");
+    String path1 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testComplexMulti1");
+    String path2 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testComplexMulti2");
+    String path3 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testComplexMulti3");
+    String path4 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testComplexMulti4");
+    String path5 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testComplexMulti5");
+    String path6 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testComplexMulti6");
     // create 4 nodes that we'll setData on or delete later
     LinkedList<ZKUtilOp> create4Nodes = new LinkedList<ZKUtilOp>();
     create4Nodes.add(ZKUtilOp.createAndFailSilent(path1, Bytes.toBytes(path1)));
@@ -154,7 +154,7 @@ public class TestZKMulti {
   public void testSingleFailure() throws Exception {
     // try to delete a node that doesn't exist
     boolean caughtNoNode = false;
-    String path = ZKUtil.joinZNode(zkw.baseZNode, "testSingleFailureZ");
+    String path = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testSingleFailureZ");
     LinkedList<ZKUtilOp> ops = new LinkedList<ZKUtilOp>();
     ops.add(ZKUtilOp.deleteNodeFailSilent(path));
     try {
@@ -191,9 +191,9 @@ public class TestZKMulti {
   @Test (timeout=60000)
   public void testSingleFailureInMulti() throws Exception {
     // try a multi where all but one operation succeeds
-    String pathA = ZKUtil.joinZNode(zkw.baseZNode, "testSingleFailureInMultiA");
-    String pathB = ZKUtil.joinZNode(zkw.baseZNode, "testSingleFailureInMultiB");
-    String pathC = ZKUtil.joinZNode(zkw.baseZNode, "testSingleFailureInMultiC");
+    String pathA = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testSingleFailureInMultiA");
+    String pathB = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testSingleFailureInMultiB");
+    String pathC = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testSingleFailureInMultiC");
     LinkedList<ZKUtilOp> ops = new LinkedList<ZKUtilOp>();
     ops.add(ZKUtilOp.createAndFailSilent(pathA, Bytes.toBytes(pathA)));
     ops.add(ZKUtilOp.createAndFailSilent(pathB, Bytes.toBytes(pathB)));
@@ -213,17 +213,17 @@ public class TestZKMulti {
 
   @Test (timeout=60000)
   public void testMultiFailure() throws Exception {
-    String pathX = ZKUtil.joinZNode(zkw.baseZNode, "testMultiFailureX");
-    String pathY = ZKUtil.joinZNode(zkw.baseZNode, "testMultiFailureY");
-    String pathZ = ZKUtil.joinZNode(zkw.baseZNode, "testMultiFailureZ");
+    String pathX = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testMultiFailureX");
+    String pathY = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testMultiFailureY");
+    String pathZ = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testMultiFailureZ");
     // create X that we will use to fail create later
     LinkedList<ZKUtilOp> ops = new LinkedList<ZKUtilOp>();
     ops.add(ZKUtilOp.createAndFailSilent(pathX, Bytes.toBytes(pathX)));
     ZKUtil.multiOrSequential(zkw, ops, false);
 
     // fail one of each create ,setData, delete
-    String pathV = ZKUtil.joinZNode(zkw.baseZNode, "testMultiFailureV");
-    String pathW = ZKUtil.joinZNode(zkw.baseZNode, "testMultiFailureW");
+    String pathV = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testMultiFailureV");
+    String pathW = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "testMultiFailureW");
     ops = new LinkedList<ZKUtilOp>();
     ops.add(ZKUtilOp.createAndFailSilent(pathX, Bytes.toBytes(pathX))); // fail  -- already exists
     ops.add(ZKUtilOp.setData(pathY, Bytes.toBytes(pathY))); // fail -- doesn't exist
@@ -267,10 +267,10 @@ public class TestZKMulti {
 
   @Test (timeout=60000)
   public void testRunSequentialOnMultiFailure() throws Exception {
-    String path1 = ZKUtil.joinZNode(zkw.baseZNode, "runSequential1");
-    String path2 = ZKUtil.joinZNode(zkw.baseZNode, "runSequential2");
-    String path3 = ZKUtil.joinZNode(zkw.baseZNode, "runSequential3");
-    String path4 = ZKUtil.joinZNode(zkw.baseZNode, "runSequential4");
+    String path1 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "runSequential1");
+    String path2 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "runSequential2");
+    String path3 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "runSequential3");
+    String path4 = ZKUtil.joinZNode(zkw.znodePaths.baseZNode, "runSequential4");
 
     // create some nodes that we will use later
     LinkedList<ZKUtilOp> ops = new LinkedList<ZKUtilOp>();

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
index 010c1c9..87e2309 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
@@ -97,10 +97,10 @@ public class TestZooKeeperNodeTracker {
     Abortable abortable = new StubAbortable();
     ZooKeeperWatcher zk = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
         "testNodeTracker", abortable);
-    ZKUtil.createAndFailSilent(zk, zk.baseZNode);
+    ZKUtil.createAndFailSilent(zk, zk.znodePaths.baseZNode);
 
     final String node =
-      ZKUtil.joinZNode(zk.baseZNode, new Long(rand.nextLong()).toString());
+      ZKUtil.joinZNode(zk.znodePaths.baseZNode, new Long(rand.nextLong()).toString());
 
     final byte [] dataOne = Bytes.toBytes("dataOne");
     final byte [] dataTwo = Bytes.toBytes("dataTwo");
@@ -326,7 +326,7 @@ public class TestZooKeeperNodeTracker {
         TEST_UTIL.getConfiguration().get(HConstants.ZOOKEEPER_ZNODE_PARENT,
             HConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT));
 
-    final String nodeName =  zkw.getMasterAddressZNode();
+    final String nodeName =  zkw.znodePaths.masterAddressZNode;
 
     // Check that we manage the case when there is no data
     ZKUtil.createAndFailSilent(zkw, nodeName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa4dfa7/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/lock/TestZKInterProcessReadWriteLock.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/lock/TestZKInterProcessReadWriteLock.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/lock/TestZKInterProcessReadWriteLock.java
index c304842..675afc0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/lock/TestZKInterProcessReadWriteLock.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/lock/TestZKInterProcessReadWriteLock.java
@@ -80,7 +80,7 @@ public class TestZKInterProcessReadWriteLock {
     TEST_UTIL.startMiniZKCluster();
     conf.setInt(HConstants.ZK_SESSION_TIMEOUT, 1000);
     ZooKeeperWatcher zkw = getZooKeeperWatcher("setup");
-    ZKUtil.createWithParents(zkw, zkw.tableLockZNode);
+    ZKUtil.createWithParents(zkw, zkw.znodePaths.tableLockZNode);
   }
 
   @AfterClass
@@ -226,7 +226,7 @@ public class TestZKInterProcessReadWriteLock {
       }
     };
     ZooKeeperWatcher zkWatcher = getZooKeeperWatcher(testName);
-    String znode = ZKUtil.joinZNode(zkWatcher.tableLockZNode, testName);
+    String znode = ZKUtil.joinZNode(zkWatcher.znodePaths.tableLockZNode, testName);
 
     return new ZKInterProcessReadWriteLock(zkWatcher, znode, handler);
   }
@@ -334,7 +334,7 @@ public class TestZKInterProcessReadWriteLock {
     ZooKeeperWatcher zkWatcher1 = new ZooKeeperWatcher(conf, "testMultipleClients-1", null);
     ZooKeeperWatcher zkWatcher2 = new ZooKeeperWatcher(conf, "testMultipleClients-2", null);
 
-    String znode = ZKUtil.joinZNode(zkWatcher1.tableLockZNode, testName);
+    String znode = ZKUtil.joinZNode(zkWatcher1.znodePaths.tableLockZNode, testName);
 
     ZKInterProcessReadWriteLock clientLock1
       = new ZKInterProcessReadWriteLock(zkWatcher1, znode, null);


Mime
View raw message