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 <ctubb...@apache.org> Authored: Fri May 29 16:04:18 2015 -0400 Committer: Christopher Tubbs <ctubb...@apache.org> 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<Entry<Key,Value>> 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", "10000", "--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", "10000"); ++ ++ List<String> 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<String> 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.asList(new String[] {"--start-row", "0", "--count", "10000"})); ++ goodExec(VerifyIngest.class, args.toArray(new String[0])); } @Test