incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [13/27] git commit: BLUR-224, safeMode 'registerNode' timeout value to sessionTimeout() + 4 sec(s).
Date Wed, 16 Oct 2013 03:32:56 GMT
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/766544c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/766544c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/766544c4

Branch: refs/heads/blur-console-v2
Commit: 766544c41fa56d9be2b4c148cba75101258280f5
Parents: c0d9987
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:46 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/766544c4/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