[8/8] accumulo git commit: Merge branch '1.7'
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/f15a451d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f15a451d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f15a451d Branch: refs/heads/master Commit: f15a451d0d2fd03f11dbb52844d15ed60428ea84 Parents: 6021fdb f7be66e Author: Christopher Tubbs Authored: Fri May 29 17:15:38 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:15:38 2015 -0400 -- .../accumulo/master/tableOps/CloneTable.java | 17 +++-- .../accumulo/tracer/AsyncSpanReceiverTest.java | 14 +++--- 2 files changed, 22 insertions(+), 9 deletions(-) --
[6/8] accumulo git commit: ACCUMULO-3862 Fix generics on Map parameter
ACCUMULO-3862 Fix generics on Map parameter Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f7be66e6 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f7be66e6 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f7be66e6 Branch: refs/heads/master Commit: f7be66e6938b40c888efc1ea7b6d161ab9e6ce05 Parents: 782dc23 Author: Christopher Tubbs Authored: Fri May 29 17:15:13 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:15:13 2015 -0400 -- .../apache/accumulo/tracer/AsyncSpanReceiverTest.java | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f7be66e6/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java -- diff --git a/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java index 6744efc..e735373 100644 --- a/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java +++ b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java @@ -16,17 +16,17 @@ */ package org.apache.accumulo.tracer; -import org.apache.accumulo.tracer.thrift.RemoteSpan; -import org.apache.htrace.HTraceConfiguration; -import org.apache.htrace.Span; -import org.apache.htrace.impl.MilliSpan; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.Collections; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import static org.junit.Assert.assertEquals; +import org.apache.accumulo.tracer.thrift.RemoteSpan; +import org.apache.htrace.HTraceConfiguration; +import org.apache.htrace.Span; +import org.apache.htrace.impl.MilliSpan; +import org.junit.Test; public class AsyncSpanReceiverTest { static class TestReceiver extends AsyncSpanReceiver { @@ -51,7 +51,7 @@ public class AsyncSpanReceiverTest { } @Override -protected String getSpanKey(Map data) { +protected String getSpanKey(Map data) { return "DEST"; }
[3/8] accumulo git commit: ACCUMULO-3169 Handle table not found case in clone
ACCUMULO-3169 Handle table not found case in clone * Ensure that we can retrieve the namespaceId for the given srcTableId when we construct a CloneTable fate operation. * Throw an appropriate exception which propagates to the client when we can't. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/76c545bb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/76c545bb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/76c545bb Branch: refs/heads/master Commit: 76c545bb3bdb4c59963cc00417a663ab1ae046f1 Parents: 182fbce Author: Christopher Tubbs Authored: Fri May 29 17:01:40 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:09:01 2015 -0400 -- .../apache/accumulo/master/tableOps/CloneTable.java| 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/76c545bb/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java index da0afd8..b7e335f 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java @@ -231,7 +231,8 @@ public class CloneTable extends MasterRepo { private static final long serialVersionUID = 1L; private CloneInfo cloneInfo; - public CloneTable(String user, String srcTableId, String tableName, Map propertiesToSet, Set propertiesToExclude) { + public CloneTable(String user, String srcTableId, String tableName, Map propertiesToSet, Set propertiesToExclude) + throws ThriftTableOperationException { cloneInfo = new CloneInfo(); cloneInfo.user = user; cloneInfo.srcTableId = srcTableId; @@ -239,7 +240,15 @@ public class CloneTable extends MasterRepo { cloneInfo.propertiesToExclude = propertiesToExclude; cloneInfo.propertiesToSet = propertiesToSet; Instance inst = HdfsZooInstance.getInstance(); -cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId); +try { + cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId); +} catch (IllegalArgumentException e) { + if (inst == null || cloneInfo.srcTableId == null) { +// just throw the exception if the illegal argument was thrown by the argument checker and not due to table non-existence +throw e; + } + throw new ThriftTableOperationException(cloneInfo.srcTableId, "", TableOperation.CLONE, TableOperationExceptionType.NOTFOUND, "Table does not exist"); +} } @Override
[1/8] accumulo git commit: ACCUMULO-3169 Handle table not found case in clone
Repository: accumulo Updated Branches: refs/heads/1.6 182fbce76 -> 76c545bb3 refs/heads/1.7 0eef354c5 -> f7be66e69 refs/heads/master 6021fdb2d -> f15a451d0 ACCUMULO-3169 Handle table not found case in clone * Ensure that we can retrieve the namespaceId for the given srcTableId when we construct a CloneTable fate operation. * Throw an appropriate exception which propagates to the client when we can't. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/76c545bb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/76c545bb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/76c545bb Branch: refs/heads/1.6 Commit: 76c545bb3bdb4c59963cc00417a663ab1ae046f1 Parents: 182fbce Author: Christopher Tubbs Authored: Fri May 29 17:01:40 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:09:01 2015 -0400 -- .../apache/accumulo/master/tableOps/CloneTable.java| 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/76c545bb/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java index da0afd8..b7e335f 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java @@ -231,7 +231,8 @@ public class CloneTable extends MasterRepo { private static final long serialVersionUID = 1L; private CloneInfo cloneInfo; - public CloneTable(String user, String srcTableId, String tableName, Map propertiesToSet, Set propertiesToExclude) { + public CloneTable(String user, String srcTableId, String tableName, Map propertiesToSet, Set propertiesToExclude) + throws ThriftTableOperationException { cloneInfo = new CloneInfo(); cloneInfo.user = user; cloneInfo.srcTableId = srcTableId; @@ -239,7 +240,15 @@ public class CloneTable extends MasterRepo { cloneInfo.propertiesToExclude = propertiesToExclude; cloneInfo.propertiesToSet = propertiesToSet; Instance inst = HdfsZooInstance.getInstance(); -cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId); +try { + cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId); +} catch (IllegalArgumentException e) { + if (inst == null || cloneInfo.srcTableId == null) { +// just throw the exception if the illegal argument was thrown by the argument checker and not due to table non-existence +throw e; + } + throw new ThriftTableOperationException(cloneInfo.srcTableId, "", TableOperation.CLONE, TableOperationExceptionType.NOTFOUND, "Table does not exist"); +} } @Override
[4/8] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/782dc237 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/782dc237 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/782dc237 Branch: refs/heads/1.7 Commit: 782dc23731b0bb161be203832c0bac45591c4ffb Parents: 0eef354 76c545b Author: Christopher Tubbs Authored: Fri May 29 17:13:55 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:13:55 2015 -0400 -- .../accumulo/master/tableOps/CloneTable.java | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/782dc237/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java -- diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java index eb2370e,b7e335f..84529a6 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java @@@ -19,11 -19,212 +19,14 @@@ package org.apache.accumulo.master.tabl import java.util.Map; import java.util.Set; + import org.apache.accumulo.core.client.Instance; -import org.apache.accumulo.core.client.NamespaceNotFoundException; -import org.apache.accumulo.core.client.impl.Namespaces; import org.apache.accumulo.core.client.impl.Tables; import org.apache.accumulo.core.client.impl.thrift.TableOperation; + import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType; -import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; + import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException; -import org.apache.accumulo.core.master.state.tables.TableState; -import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.fate.Repo; -import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; import org.apache.accumulo.master.Master; import org.apache.accumulo.server.client.HdfsZooInstance; -import org.apache.accumulo.server.security.AuditedSecurityOperation; -import org.apache.accumulo.server.security.SystemCredentials; -import org.apache.accumulo.server.tables.TableManager; -import org.apache.accumulo.server.util.MetadataTableUtil; -import org.apache.log4j.Logger; - -class CloneInfo implements Serializable { - - private static final long serialVersionUID = 1L; - - String srcTableId; - String tableName; - String tableId; - String namespaceId; - String srcNamespaceId; - Map propertiesToSet; - Set propertiesToExclude; - - public String user; -} - -class FinishCloneTable extends MasterRepo { - - private static final long serialVersionUID = 1L; - private CloneInfo cloneInfo; - - public FinishCloneTable(CloneInfo cloneInfo) { -this.cloneInfo = cloneInfo; - } - - @Override - public long isReady(long tid, Master environment) throws Exception { -return 0; - } - - @Override - public Repo call(long tid, Master environment) throws Exception { -// directories are intentionally not created this is done because directories should be unique -// because they occupy a different namespace than normal tablet directories... also some clones -// may never create files.. therefore there is no need to consume namenode space w/ directories -// that are not used... tablet will create directories as needed - -TableManager.getInstance().transitionTableState(cloneInfo.tableId, TableState.ONLINE); - -Utils.unreserveNamespace(cloneInfo.srcNamespaceId, tid, false); -if (!cloneInfo.srcNamespaceId.equals(cloneInfo.namespaceId)) - Utils.unreserveNamespace(cloneInfo.namespaceId, tid, false); -Utils.unreserveTable(cloneInfo.srcTableId, tid, false); -Utils.unreserveTable(cloneInfo.tableId, tid, true); - -environment.getEventCoordinator().event("Cloned table %s from %s", cloneInfo.tableName, cloneInfo.srcTableId); - -Logger.getLogger(FinishCloneTable.class).debug("Cloned table " + cloneInfo.srcTableId + " " + cloneInfo.tableId + " " + cloneInfo.tableName); - -return null; - } - - @Override - public void undo(long tid, Master environment) throws Exception {} - -} - -class CloneMetadata extends MasterRepo { - - private static final long serialVersionUID = 1L; - private CloneInfo cloneInfo; - - public CloneMetadata(CloneInfo cloneInfo) { -this.cloneInfo = cloneInfo; - } - - @Override - public long isReady(long tid, Master environment) throws Exception { -return 0; - } - -
[2/8] accumulo git commit: ACCUMULO-3169 Handle table not found case in clone
ACCUMULO-3169 Handle table not found case in clone * Ensure that we can retrieve the namespaceId for the given srcTableId when we construct a CloneTable fate operation. * Throw an appropriate exception which propagates to the client when we can't. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/76c545bb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/76c545bb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/76c545bb Branch: refs/heads/1.7 Commit: 76c545bb3bdb4c59963cc00417a663ab1ae046f1 Parents: 182fbce Author: Christopher Tubbs Authored: Fri May 29 17:01:40 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:09:01 2015 -0400 -- .../apache/accumulo/master/tableOps/CloneTable.java| 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/76c545bb/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java index da0afd8..b7e335f 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java @@ -231,7 +231,8 @@ public class CloneTable extends MasterRepo { private static final long serialVersionUID = 1L; private CloneInfo cloneInfo; - public CloneTable(String user, String srcTableId, String tableName, Map propertiesToSet, Set propertiesToExclude) { + public CloneTable(String user, String srcTableId, String tableName, Map propertiesToSet, Set propertiesToExclude) + throws ThriftTableOperationException { cloneInfo = new CloneInfo(); cloneInfo.user = user; cloneInfo.srcTableId = srcTableId; @@ -239,7 +240,15 @@ public class CloneTable extends MasterRepo { cloneInfo.propertiesToExclude = propertiesToExclude; cloneInfo.propertiesToSet = propertiesToSet; Instance inst = HdfsZooInstance.getInstance(); -cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId); +try { + cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId); +} catch (IllegalArgumentException e) { + if (inst == null || cloneInfo.srcTableId == null) { +// just throw the exception if the illegal argument was thrown by the argument checker and not due to table non-existence +throw e; + } + throw new ThriftTableOperationException(cloneInfo.srcTableId, "", TableOperation.CLONE, TableOperationExceptionType.NOTFOUND, "Table does not exist"); +} } @Override
[7/8] accumulo git commit: ACCUMULO-3862 Fix generics on Map parameter
ACCUMULO-3862 Fix generics on Map parameter Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f7be66e6 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f7be66e6 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f7be66e6 Branch: refs/heads/1.7 Commit: f7be66e6938b40c888efc1ea7b6d161ab9e6ce05 Parents: 782dc23 Author: Christopher Tubbs Authored: Fri May 29 17:15:13 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:15:13 2015 -0400 -- .../apache/accumulo/tracer/AsyncSpanReceiverTest.java | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f7be66e6/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java -- diff --git a/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java index 6744efc..e735373 100644 --- a/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java +++ b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java @@ -16,17 +16,17 @@ */ package org.apache.accumulo.tracer; -import org.apache.accumulo.tracer.thrift.RemoteSpan; -import org.apache.htrace.HTraceConfiguration; -import org.apache.htrace.Span; -import org.apache.htrace.impl.MilliSpan; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.Collections; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import static org.junit.Assert.assertEquals; +import org.apache.accumulo.tracer.thrift.RemoteSpan; +import org.apache.htrace.HTraceConfiguration; +import org.apache.htrace.Span; +import org.apache.htrace.impl.MilliSpan; +import org.junit.Test; public class AsyncSpanReceiverTest { static class TestReceiver extends AsyncSpanReceiver { @@ -51,7 +51,7 @@ public class AsyncSpanReceiverTest { } @Override -protected String getSpanKey(Map data) { +protected String getSpanKey(Map data) { return "DEST"; }
[5/8] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/782dc237 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/782dc237 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/782dc237 Branch: refs/heads/master Commit: 782dc23731b0bb161be203832c0bac45591c4ffb Parents: 0eef354 76c545b Author: Christopher Tubbs Authored: Fri May 29 17:13:55 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 17:13:55 2015 -0400 -- .../accumulo/master/tableOps/CloneTable.java | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/782dc237/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java -- diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java index eb2370e,b7e335f..84529a6 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java @@@ -19,11 -19,212 +19,14 @@@ package org.apache.accumulo.master.tabl import java.util.Map; import java.util.Set; + import org.apache.accumulo.core.client.Instance; -import org.apache.accumulo.core.client.NamespaceNotFoundException; -import org.apache.accumulo.core.client.impl.Namespaces; import org.apache.accumulo.core.client.impl.Tables; import org.apache.accumulo.core.client.impl.thrift.TableOperation; + import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType; -import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; + import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException; -import org.apache.accumulo.core.master.state.tables.TableState; -import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.fate.Repo; -import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; import org.apache.accumulo.master.Master; import org.apache.accumulo.server.client.HdfsZooInstance; -import org.apache.accumulo.server.security.AuditedSecurityOperation; -import org.apache.accumulo.server.security.SystemCredentials; -import org.apache.accumulo.server.tables.TableManager; -import org.apache.accumulo.server.util.MetadataTableUtil; -import org.apache.log4j.Logger; - -class CloneInfo implements Serializable { - - private static final long serialVersionUID = 1L; - - String srcTableId; - String tableName; - String tableId; - String namespaceId; - String srcNamespaceId; - Map propertiesToSet; - Set propertiesToExclude; - - public String user; -} - -class FinishCloneTable extends MasterRepo { - - private static final long serialVersionUID = 1L; - private CloneInfo cloneInfo; - - public FinishCloneTable(CloneInfo cloneInfo) { -this.cloneInfo = cloneInfo; - } - - @Override - public long isReady(long tid, Master environment) throws Exception { -return 0; - } - - @Override - public Repo call(long tid, Master environment) throws Exception { -// directories are intentionally not created this is done because directories should be unique -// because they occupy a different namespace than normal tablet directories... also some clones -// may never create files.. therefore there is no need to consume namenode space w/ directories -// that are not used... tablet will create directories as needed - -TableManager.getInstance().transitionTableState(cloneInfo.tableId, TableState.ONLINE); - -Utils.unreserveNamespace(cloneInfo.srcNamespaceId, tid, false); -if (!cloneInfo.srcNamespaceId.equals(cloneInfo.namespaceId)) - Utils.unreserveNamespace(cloneInfo.namespaceId, tid, false); -Utils.unreserveTable(cloneInfo.srcTableId, tid, false); -Utils.unreserveTable(cloneInfo.tableId, tid, true); - -environment.getEventCoordinator().event("Cloned table %s from %s", cloneInfo.tableName, cloneInfo.srcTableId); - -Logger.getLogger(FinishCloneTable.class).debug("Cloned table " + cloneInfo.srcTableId + " " + cloneInfo.tableId + " " + cloneInfo.tableName); - -return null; - } - - @Override - public void undo(long tid, Master environment) throws Exception {} - -} - -class CloneMetadata extends MasterRepo { - - private static final long serialVersionUID = 1L; - private CloneInfo cloneInfo; - - public CloneMetadata(CloneInfo cloneInfo) { -this.cloneInfo = cloneInfo; - } - - @Override - public long isReady(long tid, Master environment) throws Exception { -return 0; - } -
[1/2] accumulo git commit: ACCUMULO-3862 improved how AsyncSpanReceiver drops short spans, added test for min span length
Repository: accumulo Updated Branches: refs/heads/master fe6451091 -> 6021fdb2d ACCUMULO-3862 improved how AsyncSpanReceiver drops short spans, added test for min span length Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0eef354c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0eef354c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0eef354c Branch: refs/heads/master Commit: 0eef354c56e9ef2788c72f4dbaac596653e25bbe Parents: 61bfbb2 Author: Billie Rinaldi Authored: Fri May 29 13:29:32 2015 -0700 Committer: Billie Rinaldi Committed: Fri May 29 13:29:40 2015 -0700 -- .../accumulo/tracer/AsyncSpanReceiver.java | 14 +- .../accumulo/tracer/AsyncSpanReceiverTest.java | 129 +++ 2 files changed, 134 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0eef354c/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java -- diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java index 28a9088..a35734d 100644 --- a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java +++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java @@ -55,7 +55,7 @@ public abstract class AsyncSpanReceiver implements SpanRece public static final String SEND_TIMER_MILLIS = "tracer.send.timer.millis"; public static final String QUEUE_SIZE = "tracer.queue.size"; - private static final String SPAN_MIN_MS = "tracer.span.min.ms"; + public static final String SPAN_MIN_MS = "tracer.span.min.ms"; private final Map clients = new HashMap(); @@ -109,14 +109,6 @@ public abstract class AsyncSpanReceiver implements SpanRece while (!sendQueue.isEmpty()) { boolean sent = false; RemoteSpan s = sendQueue.peek(); - if (s.stop - s.start < minSpanSize) { -synchronized (sendQueue) { - sendQueue.remove(); - sendQueue.notifyAll(); - sendQueueSize.decrementAndGet(); -} -continue; - } SpanKey dest = getSpanKey(s.data); Destination client = clients.get(dest); if (client == null) { @@ -167,6 +159,10 @@ public abstract class AsyncSpanReceiver implements SpanRece @Override public void receiveSpan(Span s) { +if (s.getStopTimeMillis() - s.getStartTimeMillis() < minSpanSize) { + return; +} + Map data = convertToStrings(s.getKVAnnotations()); SpanKey dest = getSpanKey(data); http://git-wip-us.apache.org/repos/asf/accumulo/blob/0eef354c/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java -- diff --git a/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java new file mode 100644 index 000..6744efc --- /dev/null +++ b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java @@ -0,0 +1,129 @@ +/* + * 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.tracer; + +import org.apache.accumulo.tracer.thrift.RemoteSpan; +import org.apache.htrace.HTraceConfiguration; +import org.apache.htrace.Span; +import org.apache.htrace.impl.MilliSpan; +import org.junit.Test; + +import java.util.Collections; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.Assert.assertEquals; + +public class AsyncSpanReceiverTest { + static class TestReceiver extends AsyncSpanReceiver { +AtomicInteger spansSent = new AtomicInteger(0); + +TestReceiver() { + super(HTraceConfiguration.EMPTY); +} + +TestReceiver(HTraceConfiguration conf) { + super(conf); +} + +@Override +protected String createDestination(String o)
[2/2] accumulo git commit: Merge branch '1.7'
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/6021fdb2 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6021fdb2 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6021fdb2 Branch: refs/heads/master Commit: 6021fdb2d64cf75d12e94e06cf89b36eede68c7f Parents: fe64510 0eef354 Author: Billie Rinaldi Authored: Fri May 29 14:06:17 2015 -0700 Committer: Billie Rinaldi Committed: Fri May 29 14:06:17 2015 -0700 -- .../accumulo/tracer/AsyncSpanReceiver.java | 14 +- .../accumulo/tracer/AsyncSpanReceiverTest.java | 129 +++ 2 files changed, 134 insertions(+), 9 deletions(-) --
accumulo git commit: ACCUMULO-3862 improved how AsyncSpanReceiver drops short spans, added test for min span length
Repository: accumulo Updated Branches: refs/heads/1.7 61bfbb22e -> 0eef354c5 ACCUMULO-3862 improved how AsyncSpanReceiver drops short spans, added test for min span length Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0eef354c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0eef354c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0eef354c Branch: refs/heads/1.7 Commit: 0eef354c56e9ef2788c72f4dbaac596653e25bbe Parents: 61bfbb2 Author: Billie Rinaldi Authored: Fri May 29 13:29:32 2015 -0700 Committer: Billie Rinaldi Committed: Fri May 29 13:29:40 2015 -0700 -- .../accumulo/tracer/AsyncSpanReceiver.java | 14 +- .../accumulo/tracer/AsyncSpanReceiverTest.java | 129 +++ 2 files changed, 134 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0eef354c/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java -- diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java index 28a9088..a35734d 100644 --- a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java +++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java @@ -55,7 +55,7 @@ public abstract class AsyncSpanReceiver implements SpanRece public static final String SEND_TIMER_MILLIS = "tracer.send.timer.millis"; public static final String QUEUE_SIZE = "tracer.queue.size"; - private static final String SPAN_MIN_MS = "tracer.span.min.ms"; + public static final String SPAN_MIN_MS = "tracer.span.min.ms"; private final Map clients = new HashMap(); @@ -109,14 +109,6 @@ public abstract class AsyncSpanReceiver implements SpanRece while (!sendQueue.isEmpty()) { boolean sent = false; RemoteSpan s = sendQueue.peek(); - if (s.stop - s.start < minSpanSize) { -synchronized (sendQueue) { - sendQueue.remove(); - sendQueue.notifyAll(); - sendQueueSize.decrementAndGet(); -} -continue; - } SpanKey dest = getSpanKey(s.data); Destination client = clients.get(dest); if (client == null) { @@ -167,6 +159,10 @@ public abstract class AsyncSpanReceiver implements SpanRece @Override public void receiveSpan(Span s) { +if (s.getStopTimeMillis() - s.getStartTimeMillis() < minSpanSize) { + return; +} + Map data = convertToStrings(s.getKVAnnotations()); SpanKey dest = getSpanKey(data); http://git-wip-us.apache.org/repos/asf/accumulo/blob/0eef354c/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java -- diff --git a/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java new file mode 100644 index 000..6744efc --- /dev/null +++ b/server/tracer/src/test/java/org/apache/accumulo/tracer/AsyncSpanReceiverTest.java @@ -0,0 +1,129 @@ +/* + * 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.tracer; + +import org.apache.accumulo.tracer.thrift.RemoteSpan; +import org.apache.htrace.HTraceConfiguration; +import org.apache.htrace.Span; +import org.apache.htrace.impl.MilliSpan; +import org.junit.Test; + +import java.util.Collections; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.Assert.assertEquals; + +public class AsyncSpanReceiverTest { + static class TestReceiver extends AsyncSpanReceiver { +AtomicInteger spansSent = new AtomicInteger(0); + +TestReceiver() { + super(HTraceConfiguration.EMPTY); +} + +TestReceiver(HTraceConfiguration conf) { + super(conf); +} + +@Override +protected String createDestination(String o) throws
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/61bfbb22 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/61bfbb22 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/61bfbb22 Branch: refs/heads/1.7 Commit: 61bfbb22e39f8e379e106351bffe6448f4c60254 Parents: afdd2e6 182fbce Author: Christopher Tubbs Authored: Fri May 29 16:04:18 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 16:04:18 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++- .../accumulo/test/functional/ExamplesIT.java| 31 2 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bfbb22/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java -- diff --cc examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java index 546b1ca,1385a19..16530cc --- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java +++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java @@@ -49,9 -48,9 +49,9 @@@ public class VerifyIngest opts.parseArgs(VerifyIngest.class.getName(), args); Connector connector = opts.getConnector(); -Scanner scanner = connector.createScanner(opts.tableName, opts.auths); +Scanner scanner = connector.createScanner(opts.getTableName(), opts.auths); - scanner.setRange(new Range(new Text(String.format("row_%08d", opts.startRow)), null)); + scanner.setRange(new Range(new Text(String.format("row_%010d", opts.startRow)), null)); Iterator> si = scanner.iterator(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bfbb22/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java index ef610ca,3204528..257c7c1 --- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java @@@ -23,6 -23,6 +23,7 @@@ import static org.junit.Assert.assertTr import java.io.File; import java.io.IOException; ++import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; @@@ -446,21 -350,10 +448,26 @@@ public class ExamplesIT extends Accumul fs.delete(p, true); } goodExec(GenerateTestData.class, "--start-row", "0", "--count", "1", "--output", dir + "/tmp/input/data"); - String[] args; - if (saslEnabled) { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "--keytab", keytab, "--table", tableName}; - } else { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName}; - } - goodExec(SetupTable.class, args); -goodExec(SetupTable.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName); -goodExec(BulkIngestExample.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", -"--workDir", dir + "/tmp"); -goodExec(VerifyIngest.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "1"); ++ ++List commonArgs = new ArrayList<>(Arrays.asList(new String[] {"-i", instance, "-z", keepers, "-u", user, "--table", tableName})); +if (saslEnabled) { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "--keytab", keytab, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", - dir + "/tmp"}; ++ commonArgs.add("--keytab"); ++ commonArgs.add(keytab); +} else { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", - dir + "/tmp"}; ++ commonArgs.add("-p"); ++ commonArgs.add(passwd); +} - goodExec(BulkIngestExample.class, args); ++ ++List args = new ArrayList<>(commonArgs); ++goodExec(SetupTable.class, args.toArray(new String[0])); ++ ++args = new ArrayList<>(commonArgs); ++args.addAll(Arrays.asList(new String[] {"--inputDir", dir + "/tmp/input", "--workDir", dir + "/tmp"})); ++goodExec(BulkIngestExample.class, args.toArray(new String[0])); ++ ++args = new ArrayList<>(commonArgs); ++args.addAll(Arrays.asL
[3/6] accumulo git commit: ACCUMULO-3029 Fix broken bulk example
ACCUMULO-3029 Fix broken bulk example * Fix VerifyIngest to match GenerateTestData * Execute VerifyIngest in ExamplesIT Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/182fbce7 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/182fbce7 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/182fbce7 Branch: refs/heads/master Commit: 182fbce76fed21554abc7dfaae1a2cc016e5727e Parents: 55a9c8a Author: Christopher Tubbs Authored: Fri May 29 15:33:49 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 15:33:49 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++--- .../accumulo/test/functional/ExamplesIT.java | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/182fbce7/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java -- diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java index 846eaf7..1385a19 100644 --- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java +++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java @@ -50,7 +50,7 @@ public class VerifyIngest { Connector connector = opts.getConnector(); Scanner scanner = connector.createScanner(opts.tableName, opts.auths); -scanner.setRange(new Range(new Text(String.format("row_%08d", opts.startRow)), null)); +scanner.setRange(new Range(new Text(String.format("row_%010d", opts.startRow)), null)); Iterator> si = scanner.iterator(); @@ -61,26 +61,30 @@ public class VerifyIngest { if (si.hasNext()) { Entry entry = si.next(); -if (!entry.getKey().getRow().toString().equals(String.format("row_%08d", i))) { - log.error("unexpected row key " + entry.getKey().getRow().toString() + " expected " + String.format("row_%08d", i)); +if (!entry.getKey().getRow().toString().equals(String.format("row_%010d", i))) { + log.error("unexpected row key " + entry.getKey().getRow().toString() + " expected " + String.format("row_%010d", i)); ok = false; } -if (!entry.getValue().toString().equals(String.format("value_%08d", i))) { - log.error("unexpected value " + entry.getValue().toString() + " expected " + String.format("value_%08d", i)); +if (!entry.getValue().toString().equals(String.format("value_%010d", i))) { + log.error("unexpected value " + entry.getValue().toString() + " expected " + String.format("value_%010d", i)); ok = false; } } else { -log.error("no more rows, expected " + String.format("row_%08d", i)); +log.error("no more rows, expected " + String.format("row_%010d", i)); ok = false; break; } } -if (ok) +if (ok) { System.out.println("OK"); + System.exit(0); +} else { + System.exit(1); +} } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/182fbce7/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java index 18e9ad5..3204528 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java @@ -71,6 +71,7 @@ import org.apache.accumulo.examples.simple.mapreduce.WordCount; import org.apache.accumulo.examples.simple.mapreduce.bulk.BulkIngestExample; import org.apache.accumulo.examples.simple.mapreduce.bulk.GenerateTestData; import org.apache.accumulo.examples.simple.mapreduce.bulk.SetupTable; +import org.apache.accumulo.examples.simple.mapreduce.bulk.VerifyIngest; import org.apache.accumulo.examples.simple.shard.ContinuousQuery; import org.apache.accumulo.examples.simple.shard.Index; import org.apache.accumulo.examples.simple.shard.Query; @@ -352,6 +353,7 @@ public class ExamplesIT extends AccumuloClusterIT { goodExec(SetupTable.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName); goodExec(BulkIngestExample.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", dir + "/tmp"); +goodExec(VerifyIngest.class, "-i", instance, "-z", k
[1/6] accumulo git commit: ACCUMULO-3029 Fix broken bulk example
Repository: accumulo Updated Branches: refs/heads/1.6 55a9c8a99 -> 182fbce76 refs/heads/1.7 afdd2e6aa -> 61bfbb22e refs/heads/master 17646af60 -> fe6451091 ACCUMULO-3029 Fix broken bulk example * Fix VerifyIngest to match GenerateTestData * Execute VerifyIngest in ExamplesIT Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/182fbce7 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/182fbce7 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/182fbce7 Branch: refs/heads/1.6 Commit: 182fbce76fed21554abc7dfaae1a2cc016e5727e Parents: 55a9c8a Author: Christopher Tubbs Authored: Fri May 29 15:33:49 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 15:33:49 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++--- .../accumulo/test/functional/ExamplesIT.java | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/182fbce7/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java -- diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java index 846eaf7..1385a19 100644 --- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java +++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java @@ -50,7 +50,7 @@ public class VerifyIngest { Connector connector = opts.getConnector(); Scanner scanner = connector.createScanner(opts.tableName, opts.auths); -scanner.setRange(new Range(new Text(String.format("row_%08d", opts.startRow)), null)); +scanner.setRange(new Range(new Text(String.format("row_%010d", opts.startRow)), null)); Iterator> si = scanner.iterator(); @@ -61,26 +61,30 @@ public class VerifyIngest { if (si.hasNext()) { Entry entry = si.next(); -if (!entry.getKey().getRow().toString().equals(String.format("row_%08d", i))) { - log.error("unexpected row key " + entry.getKey().getRow().toString() + " expected " + String.format("row_%08d", i)); +if (!entry.getKey().getRow().toString().equals(String.format("row_%010d", i))) { + log.error("unexpected row key " + entry.getKey().getRow().toString() + " expected " + String.format("row_%010d", i)); ok = false; } -if (!entry.getValue().toString().equals(String.format("value_%08d", i))) { - log.error("unexpected value " + entry.getValue().toString() + " expected " + String.format("value_%08d", i)); +if (!entry.getValue().toString().equals(String.format("value_%010d", i))) { + log.error("unexpected value " + entry.getValue().toString() + " expected " + String.format("value_%010d", i)); ok = false; } } else { -log.error("no more rows, expected " + String.format("row_%08d", i)); +log.error("no more rows, expected " + String.format("row_%010d", i)); ok = false; break; } } -if (ok) +if (ok) { System.out.println("OK"); + System.exit(0); +} else { + System.exit(1); +} } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/182fbce7/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java index 18e9ad5..3204528 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java @@ -71,6 +71,7 @@ import org.apache.accumulo.examples.simple.mapreduce.WordCount; import org.apache.accumulo.examples.simple.mapreduce.bulk.BulkIngestExample; import org.apache.accumulo.examples.simple.mapreduce.bulk.GenerateTestData; import org.apache.accumulo.examples.simple.mapreduce.bulk.SetupTable; +import org.apache.accumulo.examples.simple.mapreduce.bulk.VerifyIngest; import org.apache.accumulo.examples.simple.shard.ContinuousQuery; import org.apache.accumulo.examples.simple.shard.Index; import org.apache.accumulo.examples.simple.shard.Query; @@ -352,6 +353,7 @@ public class ExamplesIT extends AccumuloClusterIT { goodExec(SetupTable.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName); goodExec(BulkIngestExample.class, "-i", instance, "-z", keepers, "-u", user, "-p
[4/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/61bfbb22 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/61bfbb22 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/61bfbb22 Branch: refs/heads/master Commit: 61bfbb22e39f8e379e106351bffe6448f4c60254 Parents: afdd2e6 182fbce Author: Christopher Tubbs Authored: Fri May 29 16:04:18 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 16:04:18 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++- .../accumulo/test/functional/ExamplesIT.java| 31 2 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bfbb22/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java -- diff --cc examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java index 546b1ca,1385a19..16530cc --- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java +++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java @@@ -49,9 -48,9 +49,9 @@@ public class VerifyIngest opts.parseArgs(VerifyIngest.class.getName(), args); Connector connector = opts.getConnector(); -Scanner scanner = connector.createScanner(opts.tableName, opts.auths); +Scanner scanner = connector.createScanner(opts.getTableName(), opts.auths); - scanner.setRange(new Range(new Text(String.format("row_%08d", opts.startRow)), null)); + scanner.setRange(new Range(new Text(String.format("row_%010d", opts.startRow)), null)); Iterator> si = scanner.iterator(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bfbb22/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java index ef610ca,3204528..257c7c1 --- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java @@@ -23,6 -23,6 +23,7 @@@ import static org.junit.Assert.assertTr import java.io.File; import java.io.IOException; ++import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; @@@ -446,21 -350,10 +448,26 @@@ public class ExamplesIT extends Accumul fs.delete(p, true); } goodExec(GenerateTestData.class, "--start-row", "0", "--count", "1", "--output", dir + "/tmp/input/data"); - String[] args; - if (saslEnabled) { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "--keytab", keytab, "--table", tableName}; - } else { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName}; - } - goodExec(SetupTable.class, args); -goodExec(SetupTable.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName); -goodExec(BulkIngestExample.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", -"--workDir", dir + "/tmp"); -goodExec(VerifyIngest.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "1"); ++ ++List commonArgs = new ArrayList<>(Arrays.asList(new String[] {"-i", instance, "-z", keepers, "-u", user, "--table", tableName})); +if (saslEnabled) { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "--keytab", keytab, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", - dir + "/tmp"}; ++ commonArgs.add("--keytab"); ++ commonArgs.add(keytab); +} else { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", - dir + "/tmp"}; ++ commonArgs.add("-p"); ++ commonArgs.add(passwd); +} - goodExec(BulkIngestExample.class, args); ++ ++List args = new ArrayList<>(commonArgs); ++goodExec(SetupTable.class, args.toArray(new String[0])); ++ ++args = new ArrayList<>(commonArgs); ++args.addAll(Arrays.asList(new String[] {"--inputDir", dir + "/tmp/input", "--workDir", dir + "/tmp"})); ++goodExec(BulkIngestExample.class, args.toArray(new String[0])); ++ ++args = new ArrayList<>(commonArgs); ++args.addAll(Arrays.
[2/6] accumulo git commit: ACCUMULO-3029 Fix broken bulk example
ACCUMULO-3029 Fix broken bulk example * Fix VerifyIngest to match GenerateTestData * Execute VerifyIngest in ExamplesIT Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/182fbce7 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/182fbce7 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/182fbce7 Branch: refs/heads/1.7 Commit: 182fbce76fed21554abc7dfaae1a2cc016e5727e Parents: 55a9c8a Author: Christopher Tubbs Authored: Fri May 29 15:33:49 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 15:33:49 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++--- .../accumulo/test/functional/ExamplesIT.java | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/182fbce7/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java -- diff --git a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java index 846eaf7..1385a19 100644 --- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java +++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java @@ -50,7 +50,7 @@ public class VerifyIngest { Connector connector = opts.getConnector(); Scanner scanner = connector.createScanner(opts.tableName, opts.auths); -scanner.setRange(new Range(new Text(String.format("row_%08d", opts.startRow)), null)); +scanner.setRange(new Range(new Text(String.format("row_%010d", opts.startRow)), null)); Iterator> si = scanner.iterator(); @@ -61,26 +61,30 @@ public class VerifyIngest { if (si.hasNext()) { Entry entry = si.next(); -if (!entry.getKey().getRow().toString().equals(String.format("row_%08d", i))) { - log.error("unexpected row key " + entry.getKey().getRow().toString() + " expected " + String.format("row_%08d", i)); +if (!entry.getKey().getRow().toString().equals(String.format("row_%010d", i))) { + log.error("unexpected row key " + entry.getKey().getRow().toString() + " expected " + String.format("row_%010d", i)); ok = false; } -if (!entry.getValue().toString().equals(String.format("value_%08d", i))) { - log.error("unexpected value " + entry.getValue().toString() + " expected " + String.format("value_%08d", i)); +if (!entry.getValue().toString().equals(String.format("value_%010d", i))) { + log.error("unexpected value " + entry.getValue().toString() + " expected " + String.format("value_%010d", i)); ok = false; } } else { -log.error("no more rows, expected " + String.format("row_%08d", i)); +log.error("no more rows, expected " + String.format("row_%010d", i)); ok = false; break; } } -if (ok) +if (ok) { System.out.println("OK"); + System.exit(0); +} else { + System.exit(1); +} } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/182fbce7/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java index 18e9ad5..3204528 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java @@ -71,6 +71,7 @@ import org.apache.accumulo.examples.simple.mapreduce.WordCount; import org.apache.accumulo.examples.simple.mapreduce.bulk.BulkIngestExample; import org.apache.accumulo.examples.simple.mapreduce.bulk.GenerateTestData; import org.apache.accumulo.examples.simple.mapreduce.bulk.SetupTable; +import org.apache.accumulo.examples.simple.mapreduce.bulk.VerifyIngest; import org.apache.accumulo.examples.simple.shard.ContinuousQuery; import org.apache.accumulo.examples.simple.shard.Index; import org.apache.accumulo.examples.simple.shard.Query; @@ -352,6 +353,7 @@ public class ExamplesIT extends AccumuloClusterIT { goodExec(SetupTable.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName); goodExec(BulkIngestExample.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", dir + "/tmp"); +goodExec(VerifyIngest.class, "-i", instance, "-z", keep
[6/6] accumulo git commit: Merge branch '1.7'
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/fe645109 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fe645109 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fe645109 Branch: refs/heads/master Commit: fe64510913710c268b4a17fa61a9e70fd2943d2d Parents: 17646af 61bfbb2 Author: Christopher Tubbs Authored: Fri May 29 16:17:37 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 16:17:37 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++- .../accumulo/test/functional/ExamplesIT.java| 31 2 files changed, 30 insertions(+), 19 deletions(-) --