accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-2427 give zk a little more time to start up... still failing with no output
Date Tue, 04 Mar 2014 18:21:11 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT ca61fe814 -> 2f7b9d306


ACCUMULO-2427 give zk a little more time to start up... still failing with no output


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2f7b9d30
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2f7b9d30
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2f7b9d30

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 2f7b9d306ab5b75e8b99d8ca0de1f25ddfcf53d5
Parents: ca61fe8
Author: Eric Newton <eric.newton@gmail.com>
Authored: Tue Mar 4 13:21:32 2014 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Tue Mar 4 13:21:32 2014 -0500

----------------------------------------------------------------------
 .../accumulo/minicluster/impl/MiniAccumuloClusterImpl.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2f7b9d30/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 492205e..8a9736d 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -130,6 +130,8 @@ public class MiniAccumuloClusterImpl {
     }
   }
 
+  private static final long ZOOKEEPER_STARTUP_WAIT = 20*1000;
+
   private boolean initialized = false;
   private Process zooKeeperProcess = null;
   private Process masterProcess = null;
@@ -452,8 +454,8 @@ public class MiniAccumuloClusterImpl {
           if (n >= 4 && new String(buffer, 0, 4).equals("imok"))
             break;
         } catch (Exception e) {
-          if (System.currentTimeMillis() - startTime >= 10000) {
-            throw new RuntimeException("Zookeeper did not start within 10 seconds. Check
the logs in " + config.getLogDir() + " for errors.  Last exception: " + e);
+          if (System.currentTimeMillis() - startTime >= ZOOKEEPER_STARTUP_WAIT) {
+            throw new RuntimeException("Zookeeper did not start within " + (ZOOKEEPER_STARTUP_WAIT/1000)
+ " seconds. Check the logs in " + config.getLogDir() + " for errors.  Last exception: " +
e);
           }
           UtilWaitThread.sleep(250);
         } finally {


Mime
View raw message