Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AEB09ED93 for ; Fri, 8 Mar 2013 15:27:15 +0000 (UTC) Received: (qmail 76400 invoked by uid 500); 8 Mar 2013 15:27:15 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 73231 invoked by uid 500); 8 Mar 2013 15:27:11 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 73204 invoked by uid 99); 8 Mar 2013 15:27:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Mar 2013 15:27:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Mar 2013 15:27:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 179162388A74; Fri, 8 Mar 2013 15:26:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130308152650.179162388A74@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;