incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twilli...@apache.org
Subject git commit: remove persistent controllers
Date Wed, 30 Jul 2014 11:35:10 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/blur-342a 33963185a -> 277ea2891


remove persistent controllers


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

Branch: refs/heads/blur-342a
Commit: 277ea2891ee293802e7505a20b4207ae68edeeaa
Parents: 3396318
Author: Tim <twilliams@apache.org>
Authored: Tue Jul 29 13:52:06 2014 -0400
Committer: Tim <twilliams@apache.org>
Committed: Tue Jul 29 13:52:06 2014 -0400

----------------------------------------------------------------------
 .../clusterstatus/ZookeeperClusterStatus.java        | 13 +------------
 .../org/apache/blur/thrift/BlurControllerServer.java | 15 ---------------
 2 files changed, 1 insertion(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/277ea289/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
index bf10b8c..0a9a57d 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
@@ -245,18 +245,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
 
   @Override
   public List<String> getControllerServerList() {
-    long s = System.nanoTime();
-    try {
-      checkIfOpen();
-      return _zk.getChildren(ZookeeperPathConstants.getControllersPath(), false);
-    } catch (KeeperException e) {
-      throw new RuntimeException(e);
-    } catch (InterruptedException e) {
-      throw new RuntimeException(e);
-    } finally {
-      long e = System.nanoTime();
-      LOG.debug("trace getControllerServerList [" + (e - s) / 1000000.0 + " ms]");
-    }
+    return getOnlineControllerList();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/277ea289/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
index a0453bc..e378c44 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
@@ -273,7 +273,6 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
   private void setupZookeeper() throws KeeperException, InterruptedException {
     BlurUtil.createIfMissing(_zookeeper, "/blur");
     BlurUtil.createIfMissing(_zookeeper, ZookeeperPathConstants.getOnlineControllersPath());
-    BlurUtil.createIfMissing(_zookeeper, ZookeeperPathConstants.getControllersPath());
     BlurUtil.createIfMissing(_zookeeper, ZookeeperPathConstants.getClustersPath());
   }
 
@@ -387,20 +386,6 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
   }
 
   private void registerMyself() {
-    // Register Node
-    try {
-      String controllerPath = ZookeeperPathConstants.getControllersPath() + "/" + _nodeName;
-      if (_zookeeper.exists(controllerPath, false) == null) {
-        // Don't set the version for the registered nodes but only to the online
-        // nodes.
-        _zookeeper.create(controllerPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-      }
-    } catch (KeeperException e) {
-      throw new RuntimeException(e);
-    } catch (InterruptedException e) {
-      throw new RuntimeException(e);
-    }
-
     // Wait for other instances (named the same name) to die
     try {
       String version = BlurUtil.getVersion();


Mime
View raw message