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 2015/06/05 00:03:42 UTC

[1/3] accumulo git commit: ACCUMULO-3887 Hex-encode the session ID in the client.

Repository: accumulo
Updated Branches:
  refs/heads/1.7 e04ea77d7 -> 884165d28
  refs/heads/master 01ae5b858 -> 428b5b781


ACCUMULO-3887 Hex-encode the session ID in the client.


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

Branch: refs/heads/1.7
Commit: 884165d283952877d55e98e0d0c90fd1f1adcadd
Parents: e04ea77
Author: Josh Elser <el...@apache.org>
Authored: Thu Jun 4 18:02:14 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Jun 4 18:02:14 2015 -0400

----------------------------------------------------------------------
 .../base/src/main/java/org/apache/accumulo/server/util/Admin.java  | 2 +-
 .../test/java/org/apache/accumulo/test/functional/ShutdownIT.java  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/884165d2/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index c7f9739..3c4a05a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -411,7 +411,7 @@ public class Admin implements KeywordExecutable {
       if (0 == sessionId) {
         return hostAndPort;
       }
-      return hostAndPort + "[" + sessionId + "]";
+      return hostAndPort + "[" + Long.toHexString(sessionId) + "]";
     } catch (InterruptedException | KeeperException e) {
       log.warn("Failed to communicate with ZooKeeper to find session ID for TabletServer.");
       return hostAndPort;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/884165d2/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
index c3042d7..ac38f19 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
@@ -112,6 +112,7 @@ public class ShutdownIT extends ConfigurableMacIT {
     List<String> tabletServers = c.instanceOperations().getTabletServers();
     assertEquals(2, tabletServers.size());
     String doomed = tabletServers.get(0);
+    log.info("Stopping " + doomed);
     assertEquals(0, cluster.exec(Admin.class, "stop", doomed).waitFor());
     tabletServers = c.instanceOperations().getTabletServers();
     assertEquals(1, tabletServers.size());


[3/3] accumulo git commit: Merge branch '1.7'

Posted by el...@apache.org.
Merge branch '1.7'


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

Branch: refs/heads/master
Commit: 428b5b78192c5ec2e696d5a4e2555b69f426d8c2
Parents: 01ae5b8 884165d
Author: Josh Elser <el...@apache.org>
Authored: Thu Jun 4 18:03:19 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Jun 4 18:03:19 2015 -0400

----------------------------------------------------------------------
 .../base/src/main/java/org/apache/accumulo/server/util/Admin.java  | 2 +-
 .../main/java/org/apache/accumulo/test/functional/ShutdownIT.java  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/428b5b78/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
----------------------------------------------------------------------
diff --cc test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
index f27ee02,0000000..06399d8
mode 100644,000000..100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
@@@ -1,121 -1,0 +1,122 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.test.functional;
 +
 +import static org.junit.Assert.assertEquals;
 +import static org.junit.Assert.assertFalse;
 +
 +import java.io.IOException;
 +import java.util.List;
 +import java.util.concurrent.atomic.AtomicReference;
 +
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.util.UtilWaitThread;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
 +import org.apache.accumulo.server.util.Admin;
 +import org.apache.accumulo.test.TestIngest;
 +import org.apache.accumulo.test.TestRandomDeletes;
 +import org.apache.accumulo.test.VerifyIngest;
 +import org.junit.Test;
 +
 +public class ShutdownIT extends ConfigurableMacBase {
 +
 +  @Override
 +  protected int defaultTimeoutSeconds() {
 +    return 2 * 60;
 +  }
 +
 +  @Test
 +  public void shutdownDuringIngest() throws Exception {
 +    Process ingest = cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD,
 +        "--createTable");
 +    UtilWaitThread.sleep(100);
 +    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
 +    ingest.destroy();
 +  }
 +
 +  @Test
 +  public void shutdownDuringQuery() throws Exception {
 +    assertEquals(0,
 +        cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable")
 +            .waitFor());
 +    Process verify = cluster.exec(VerifyIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD);
 +    UtilWaitThread.sleep(100);
 +    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
 +    verify.destroy();
 +  }
 +
 +  @Test
 +  public void shutdownDuringDelete() throws Exception {
 +    assertEquals(0,
 +        cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable")
 +            .waitFor());
 +    Process deleter = cluster.exec(TestRandomDeletes.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD);
 +    UtilWaitThread.sleep(100);
 +    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
 +    deleter.destroy();
 +  }
 +
 +  @Test
 +  public void shutdownDuringDeleteTable() throws Exception {
 +    final Connector c = getConnector();
 +    for (int i = 0; i < 10; i++) {
 +      c.tableOperations().create("table" + i);
 +    }
 +    final AtomicReference<Exception> ref = new AtomicReference<Exception>();
 +    Thread async = new Thread() {
 +      @Override
 +      public void run() {
 +        try {
 +          for (int i = 0; i < 10; i++)
 +            c.tableOperations().delete("table" + i);
 +        } catch (Exception ex) {
 +          ref.set(ex);
 +        }
 +      }
 +    };
 +    async.start();
 +    UtilWaitThread.sleep(100);
 +    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
 +    if (ref.get() != null)
 +      throw ref.get();
 +  }
 +
 +  @Test
 +  public void stopDuringStart() throws Exception {
 +    assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
 +  }
 +
 +  @Test
 +  public void adminStop() throws Exception {
 +    runAdminStopTest(getConnector(), cluster);
 +  }
 +
 +  static void runAdminStopTest(Connector c, MiniAccumuloClusterImpl cluster) throws InterruptedException, IOException {
 +    assertEquals(0,
 +        cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable")
 +            .waitFor());
 +    List<String> tabletServers = c.instanceOperations().getTabletServers();
 +    assertEquals(2, tabletServers.size());
 +    String doomed = tabletServers.get(0);
++    log.info("Stopping " + doomed);
 +    assertEquals(0, cluster.exec(Admin.class, "stop", doomed).waitFor());
 +    tabletServers = c.instanceOperations().getTabletServers();
 +    assertEquals(1, tabletServers.size());
 +    assertFalse(tabletServers.get(0).equals(doomed));
 +  }
 +
 +}


[2/3] accumulo git commit: ACCUMULO-3887 Hex-encode the session ID in the client.

Posted by el...@apache.org.
ACCUMULO-3887 Hex-encode the session ID in the client.


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

Branch: refs/heads/master
Commit: 884165d283952877d55e98e0d0c90fd1f1adcadd
Parents: e04ea77
Author: Josh Elser <el...@apache.org>
Authored: Thu Jun 4 18:02:14 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Jun 4 18:02:14 2015 -0400

----------------------------------------------------------------------
 .../base/src/main/java/org/apache/accumulo/server/util/Admin.java  | 2 +-
 .../test/java/org/apache/accumulo/test/functional/ShutdownIT.java  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/884165d2/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index c7f9739..3c4a05a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -411,7 +411,7 @@ public class Admin implements KeywordExecutable {
       if (0 == sessionId) {
         return hostAndPort;
       }
-      return hostAndPort + "[" + sessionId + "]";
+      return hostAndPort + "[" + Long.toHexString(sessionId) + "]";
     } catch (InterruptedException | KeeperException e) {
       log.warn("Failed to communicate with ZooKeeper to find session ID for TabletServer.");
       return hostAndPort;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/884165d2/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
index c3042d7..ac38f19 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java
@@ -112,6 +112,7 @@ public class ShutdownIT extends ConfigurableMacIT {
     List<String> tabletServers = c.instanceOperations().getTabletServers();
     assertEquals(2, tabletServers.size());
     String doomed = tabletServers.get(0);
+    log.info("Stopping " + doomed);
     assertEquals(0, cluster.exec(Admin.class, "stop", doomed).waitFor());
     tabletServers = c.instanceOperations().getTabletServers();
     assertEquals(1, tabletServers.size());