incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: ZooKeeper path cleanup, the node path changed to registered-nodes and online/shard-nodes to online-nodes.
Date Sat, 18 May 2013 18:05:13 GMT
ZooKeeper path cleanup, the node path changed to registered-nodes and online/shard-nodes to
online-nodes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/53d224fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/53d224fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/53d224fd

Branch: refs/heads/0.1.5
Commit: 53d224fd067fa96e1f642ae6b4454c94161243aa
Parents: f5e1675
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat May 18 14:03:51 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat May 18 14:03:51 2013 -0400

----------------------------------------------------------------------
 .../clusterstatus/ZookeeperClusterStatus.java      |    6 ++++--
 .../clusterstatus/ZookeeperPathConstants.java      |    8 ++------
 .../main/java/org/apache/blur/utils/BlurUtil.java  |    1 -
 3 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/53d224fd/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
b/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
index 0c595f4..16176b0 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
@@ -283,7 +283,8 @@ public class ZookeeperClusterStatus extends ClusterStatus {
     long s = System.nanoTime();
     try {
       checkIfOpen();
-      return _zk.getChildren(ZookeeperPathConstants.getClustersPath() + "/" + cluster + "/online/shard-nodes",
false);
+      String onlineShardsPath = ZookeeperPathConstants.getOnlineShardsPath(cluster);
+      return _zk.getChildren(onlineShardsPath, false);
     } catch (KeeperException e) {
       throw new RuntimeException(e);
     } catch (InterruptedException e) {
@@ -312,7 +313,8 @@ public class ZookeeperClusterStatus extends ClusterStatus {
     long s = System.nanoTime();
     try {
       checkIfOpen();
-      return _zk.getChildren(ZookeeperPathConstants.getClustersPath() + "/" + cluster + "/shard-nodes",
false);
+      String registeredShardsPath = ZookeeperPathConstants.getRegisteredShardsPath(cluster);
+      return _zk.getChildren(registeredShardsPath, false);
     } catch (KeeperException e) {
       throw new RuntimeException(e);
     } catch (InterruptedException e) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/53d224fd/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperPathConstants.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperPathConstants.java
b/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperPathConstants.java
index cb9eeed..f2eee4f 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperPathConstants.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperPathConstants.java
@@ -47,12 +47,8 @@ public class ZookeeperPathConstants {
     return getTablePath(cluster, table) + "/shard-count";
   }
 
-  public static String getOnlinePath(String cluster) {
-    return getClusterPath(cluster) + "/online";
-  }
-
   public static String getOnlineShardsPath(String cluster) {
-    return getOnlinePath(cluster) + "/shard-nodes";
+    return getClusterPath(cluster) + "/online-nodes";
   }
 
   public static String getTablesPath(String cluster) {
@@ -68,7 +64,7 @@ public class ZookeeperPathConstants {
   }
 
   public static String getRegisteredShardsPath(String cluster) {
-    return getClusterPath(cluster) + "/shard-nodes";
+    return getClusterPath(cluster) + "/registered-nodes";
   }
 
   public static String getTableCompressionCodecPath(String cluster, String table) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/53d224fd/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index 643b09c..e977b37 100644
--- a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -142,7 +142,6 @@ public class BlurUtil {
       BlurUtil.createIfMissing(zookeeper, ZookeeperPathConstants.getClusterPath(cluster));
       BlurUtil.createIfMissing(zookeeper, ZookeeperPathConstants.getSafemodePath(cluster));
       BlurUtil.createIfMissing(zookeeper, ZookeeperPathConstants.getRegisteredShardsPath(cluster));
-      BlurUtil.createIfMissing(zookeeper, ZookeeperPathConstants.getOnlinePath(cluster));
       BlurUtil.createIfMissing(zookeeper, ZookeeperPathConstants.getOnlineShardsPath(cluster));
       BlurUtil.createIfMissing(zookeeper, ZookeeperPathConstants.getTablesPath(cluster));
     }


Mime
View raw message