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 2014/04/04 22:33:57 UTC
[12/19] git commit: ACCUMULO-2433 Use IteratorSetting instead of
config to avoid ZK issues. Fix loop variable usage.
ACCUMULO-2433 Use IteratorSetting instead of config to avoid ZK issues. Fix loop variable usage.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/174c6782
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/174c6782
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/174c6782
Branch: refs/heads/1.5.2-SNAPSHOT
Commit: 174c678236b6bc9ab17487e0d3ca150766887f7b
Parents: 2cbe887
Author: Josh Elser <el...@apache.org>
Authored: Fri Apr 4 15:15:55 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Fri Apr 4 15:15:55 2014 -0400
----------------------------------------------------------------------
.../java/org/apache/accumulo/test/ShellServerTest.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/174c6782/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java b/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
index 533fdcf..6d5be0b 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
@@ -43,6 +43,7 @@ import jline.ConsoleReader;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.client.security.tokens.PasswordToken;
@@ -57,6 +58,7 @@ import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.minicluster.MiniAccumuloCluster;
import org.apache.accumulo.minicluster.MiniAccumuloConfig;
import org.apache.accumulo.server.trace.TraceServer;
+import org.apache.accumulo.test.functional.SlowIterator;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.conf.Configuration;
@@ -838,13 +840,13 @@ public class ShellServerTest {
for (int i = 0; i < 6; i++) {
exec("insert " + i + " cf cq value", true);
}
- exec("config -t " + table + " -s table.iterator.scan.slow=30,org.apache.accumulo.test.functional.SlowIterator", true);
- exec("config -t " + table + " -s table.iterator.scan.slow.opt.sleepTime=500", true);
-
ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
Connector connector = instance.getConnector("root", new PasswordToken(secret));
final Scanner s = connector.createScanner(table, Constants.NO_AUTHS);
+ IteratorSetting cfg = new IteratorSetting(30, SlowIterator.class);
+ cfg.addOption("sleepTime", "500");
+ s.addScanIterator(cfg);
Thread thread = new Thread() {
public void run() {
@@ -864,7 +866,7 @@ public class ShellServerTest {
for (int i = 0; i < 50 && scans.isEmpty(); i++) {
String currentScans = exec("listscans", true);
String[] lines = currentScans.split("\n");
- for (int scanOffset = 2; i < lines.length; i++) {
+ for (int scanOffset = 2; scanOffset < lines.length; scanOffset++) {
String currentScan = lines[scanOffset];
if (currentScan.contains(table)) {
scans.add(currentScan);