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:15 UTC

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

Repository: accumulo
Updated Branches:
  refs/heads/master cf61a3c2e -> 5aec59afc


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/master
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/3] git commit: ACCUMULO-2427 close the open socket, allow for info after imok, report the last exception

Posted by ec...@apache.org.
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/d7e939fd
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d7e939fd
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d7e939fd

Branch: refs/heads/master
Commit: d7e939fd9909779ade821ae7c7d1589c59fd978b
Parents: 07604ca 9ff2c45
Author: Eric Newton <er...@gmail.com>
Authored: Tue Mar 4 12:46:02 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Mar 4 12:46:02 2014 -0500

----------------------------------------------------------------------
 .../apache/accumulo/core/client/impl/Tables.java  | 18 +++++++++++-------
 .../minicluster/impl/MiniAccumuloClusterImpl.java |  4 ++--
 2 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d7e939fd/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
index 10ef48f,5988bda..1dd9ef0
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
@@@ -287,18 -287,21 +287,22 @@@ public class Tables 
  
    /**
     * Returns the namespace id for a given table ID.
-    * @param instance The Accumulo Instance
-    * @param tableId The tableId
+    * 
+    * @param instance
+    *          The Accumulo Instance
+    * @param tableId
+    *          The tableId
     * @return The namespace id which this table resides in.
-    * @throws IllegalArgumentException if the table doesn't exist in ZooKeeper
+    * @throws IllegalArgumentException
+    *           if the table doesn't exist in ZooKeeper
     */
    public static String getNamespaceId(Instance instance, String tableId) throws IllegalArgumentException {
 -    ArgumentChecker.notNull(instance, tableId);
 +    checkArgument(instance != null, "instance is null");
 +    checkArgument(tableId != null, "tableId is null");
-     
+ 
      ZooCache zc = getZooCache(instance);
      byte[] n = zc.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_NAMESPACE);
-     
+ 
      // We might get null out of ZooCache if this tableID doesn't exist
      if (null == n) {
        throw new IllegalArgumentException("Table with id " + tableId + " does not exist");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d7e939fd/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
----------------------------------------------------------------------


[3/3] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/accumulo

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


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

Branch: refs/heads/master
Commit: 5aec59afc7a81bbd437f661885190df625e480ef
Parents: d7e939f cf61a3c
Author: Eric Newton <er...@gmail.com>
Authored: Tue Mar 4 12:47:20 2014 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Mar 4 12:47:20 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(-)
----------------------------------------------------------------------