You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/03/07 21:53:29 UTC

[15/50] [abbrv] git commit: ACCUMULO-2427 give zk a little more time to start up... still failing with no output

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/ACCUMULO-2061
Commit: 2f7b9d306ab5b75e8b99d8ca0de1f25ddfcf53d5
Parents: ca61fe8
Author: Eric Newton <er...@gmail.com>
Authored: Tue Mar 4 13:21:32 2014 -0500
Committer: Eric Newton <er...@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 {