incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: BLUR-224, safeMode 'registerNode' timeout value to sessionTimeout() + 4 sec(s).
Date Thu, 10 Oct 2013 00:30:13 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 7ca22cd5e -> ca29d5d5b


BLUR-224, safeMode 'registerNode' timeout value to sessionTimeout() + 4 sec(s).

Signed-off-by: Aaron McCurry <amccurry@gmail.com>


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

Branch: refs/heads/apache-blur-0.2
Commit: ca29d5d5bd2dcffb81f68421cbc05786f3b3186b
Parents: 7ca22cd
Author: Vikrant Navalgund <vikrant.navalgund@gmail.com>
Authored: Thu Oct 10 11:21:41 2013 +1100
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Oct 9 20:29:14 2013 -0400

----------------------------------------------------------------------
 .../blur/manager/indexserver/DistributedIndexServer.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ca29d5d5/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
index 49908e4..2fc819c 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
@@ -152,8 +152,12 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer
{
     registerMyselfAsMemberOfCluster();
     String onlineShardsPath = ZookeeperPathConstants.getOnlineShardsPath(_cluster);
     String safemodePath = ZookeeperPathConstants.getSafemodePath(_cluster);
+
+    //Set the registerNode timeout value to zk sessionTimeout + {4} seconds
+    int registerNodeTimeOut = _zookeeper.getSessionTimeout()/1000 + 4;
+      
     SafeMode safeMode = new SafeMode(_zookeeper, safemodePath, onlineShardsPath, TimeUnit.MILLISECONDS,
_safeModeDelay,
-        TimeUnit.SECONDS, 60);
+        TimeUnit.SECONDS, registerNodeTimeOut);
     safeMode.registerNode(getNodeName(), BlurUtil.getVersion().getBytes());
 
     _running.set(true);


Mime
View raw message