You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2015/05/29 22:29:26 UTC
[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 <ct...@apache.org>
Authored: Fri May 29 15:33:49 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
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<Entry<Key,Value>> si = scanner.iterator();
@@ -61,26 +61,30 @@ public class VerifyIngest {
if (si.hasNext()) {
Entry<Key,Value> 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", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "10000");
}
@Test
[2/6] accumulo git commit: ACCUMULO-3029 Fix broken bulk example
Posted by ct...@apache.org.
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 <ct...@apache.org>
Authored: Fri May 29 15:33:49 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
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<Entry<Key,Value>> si = scanner.iterator();
@@ -61,26 +61,30 @@ public class VerifyIngest {
if (si.hasNext()) {
Entry<Key,Value> 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", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "10000");
}
@Test
[3/6] accumulo git commit: ACCUMULO-3029 Fix broken bulk example
Posted by ct...@apache.org.
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 <ct...@apache.org>
Authored: Fri May 29 15:33:49 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
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<Entry<Key,Value>> si = scanner.iterator();
@@ -61,26 +61,30 @@ public class VerifyIngest {
if (si.hasNext()) {
Entry<Key,Value> 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", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "10000");
}
@Test
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Posted by ct...@apache.org.
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 <ct...@apache.org>
Authored: Fri May 29 16:04:18 2015 -0400
Committer: Christopher Tubbs <ct...@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
[6/6] accumulo git commit: Merge branch '1.7'
Posted by ct...@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/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 <ct...@apache.org>
Authored: Fri May 29 16:17:37 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
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(-)
----------------------------------------------------------------------
[4/6] accumulo git commit: Merge branch '1.6' into 1.7
Posted by ct...@apache.org.
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 <ct...@apache.org>
Authored: Fri May 29 16:04:18 2015 -0400
Committer: Christopher Tubbs <ct...@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