accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1454423 - /accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Verify.java
Date Fri, 08 Mar 2013 15:26:50 GMT
Author: ecn
Date: Fri Mar  8 15:26:49 2013
New Revision: 1454423

URL: http://svn.apache.org/r1454423
Log:
ACCUMULO-1164 use cli utilities

Modified:
    accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Verify.java

Modified: accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Verify.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Verify.java?rev=1454423&r1=1454422&r2=1454423&view=diff
==============================================================================
--- accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Verify.java
(original)
+++ accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/Verify.java
Fri Mar  8 15:26:49 2013
@@ -23,13 +23,9 @@ import java.util.Properties;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.cli.ClientOnRequiredTable;
 import org.apache.accumulo.core.client.RowIterator;
 import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
-import org.apache.accumulo.core.conf.DefaultConfiguration;
-import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
@@ -101,16 +97,9 @@ public class Verify extends Test {
   }
     
   public static void main(String args[]) throws Exception {
-    int i = 0;
-    String instance = args[i++];
-    String keepers = args[i++];
-    String username = args[i++];
-    String passwd = args[i++];
-    String tablename = args[i++];
-    int timeout = (int) DefaultConfiguration.getInstance().getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
-    Instance inst = new ZooKeeperInstance(instance, keepers, timeout);
-    Connector conn = inst.getConnector(username, passwd.getBytes());
-    Scanner scanner = conn.createScanner(tablename, conn.securityOperations().getUserAuthorizations(username));
+    ClientOnRequiredTable opts = new ClientOnRequiredTable();
+    opts.parseArgs(Verify.class.getName(), args);
+    Scanner scanner = opts.getConnector().createScanner(opts.tableName, opts.auths);
     scanner.fetchColumnFamily(BulkPlusOne.CHECK_COLUMN_FAMILY);
     Text startBadRow = null;
     Text lastBadRow = null;



Mime
View raw message