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

[1/2] git commit: ACCUMULO-2427 close the open socket, allow for info after imok, report the last exception

Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 9abf9424d -> ca61fe814


ACCUMULO-2427 close the open socket, allow for info after imok, report the last exception


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 9ff2c452311bcbc825196f7e361e312f232523ed
Parents: 04d8cd8
Author: Eric Newton <er...@gmail.com>
Authored: Tue Mar 4 12:44:56 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Mar 4 12:44:56 2014 -0500

----------------------------------------------------------------------
 .../minicluster/impl/MiniAccumuloClusterImpl.java         | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9ff2c452/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 c1b3b8b..492205e 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
@@ -442,19 +442,23 @@ public class MiniAccumuloClusterImpl {
       // sleep a little bit to let zookeeper come up before calling init, seems to work better
       long startTime = System.currentTimeMillis();
       while (true) {
+        Socket s = null;
         try {
-          Socket s = new Socket("localhost", config.getZooKeeperPort());
+          s = new Socket("localhost", config.getZooKeeperPort());
           s.getOutputStream().write("ruok\n".getBytes());
           s.getOutputStream().flush();
           byte buffer[] = new byte[100];
           int n = s.getInputStream().read(buffer);
-          if (n == 4 && new String(buffer, 0, n).equals("imok"))
+          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.");
+            throw new RuntimeException("Zookeeper did not start within 10 seconds. Check the logs in " + config.getLogDir() + " for errors.  Last exception: " + e);
           }
           UtilWaitThread.sleep(250);
+        } finally {
+          if (s != null)
+            s.close();
         }
       }
       Process initProcess = exec(Initialize.class, "--instance-name", config.getInstanceName(), "--password", config.getRootPassword());


[2/2] git commit: Merge branch '1.6.0-SNAPSHOT' of https://git-wip-us.apache.org/repos/asf/accumulo into 1.6.0-SNAPSHOT

Posted by ec...@apache.org.
Merge branch '1.6.0-SNAPSHOT' of https://git-wip-us.apache.org/repos/asf/accumulo into 1.6.0-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: ca61fe814db20da7d532259847cfeccc0b2a4204
Parents: 9ff2c45 9abf942
Author: Eric Newton <er...@gmail.com>
Authored: Tue Mar 4 12:46:55 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Mar 4 12:46:55 2014 -0500

----------------------------------------------------------------------
 .../apache/accumulo/fate/zookeeper/ZooLock.java | 43 +++++++++++++----
 .../java/org/apache/accumulo/master/Master.java |  1 +
 .../test/continuous/ContinuousBatchWalker.java  |  2 +-
 .../test/continuous/ContinuousIngest.java       |  9 ++--
 .../test/continuous/ContinuousQuery.java        |  2 +-
 .../test/continuous/ContinuousScanner.java      |  2 +-
 .../test/continuous/ContinuousUtil.java         | 49 ++++++++++++++++++++
 .../test/continuous/ContinuousWalk.java         |  2 +-
 8 files changed, 91 insertions(+), 19 deletions(-)
----------------------------------------------------------------------