accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1423923 [7/8] - in /accumulo/trunk: ./ bin/ core/ core/src/main/java/org/apache/accumulo/core/cli/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/client/mapreduce/ core/src/main/java/or...
Date Wed, 19 Dec 2012 16:25:07 GMT
Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java Wed Dec 19 16:25:03 2012
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.Socket;
 import java.net.URLEncoder;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
@@ -34,12 +35,7 @@ import java.util.regex.Pattern;
 
 import javax.net.SocketFactory;
 
-import org.apache.commons.cli.BasicParser;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.MissingOptionException;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
+import org.apache.accumulo.core.cli.Help;
 import org.apache.commons.io.filefilter.WildcardFileFilter;
 import org.apache.commons.lang.math.LongRange;
 import org.apache.log4j.Category;
@@ -52,6 +48,9 @@ import org.apache.log4j.spi.ThrowableInf
 import org.apache.log4j.varia.LevelRangeFilter;
 import org.apache.log4j.xml.XMLLayout;
 
+import com.beust.jcommander.IStringConverter;
+import com.beust.jcommander.Parameter;
+
 public class SendLogToChainsaw extends XMLLayout {
   
   private static Pattern logPattern = Pattern.compile(
@@ -211,53 +210,49 @@ public class SendLogToChainsaw extends X
     return result;
   }
   
-  private static Options getOptions() {
-    Options opts = new Options();
+  private static class DateConverter implements IStringConverter<Date> {
+    @Override
+    public Date convert(String value) {
+      SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
+      try {
+        return formatter.parse(value);
+      } catch (ParseException e) {
+        throw new RuntimeException(e);
+      }
+    }
+    
+  }
+  
+  private static class Opts extends Help {
+    
+    @Parameter(names={"-d", "--logDirectory"}, description="ACCUMULO log directory path", required=true)
+    String dir;
+    
+    @Parameter(names={"-f", "--fileFilter"}, description="filter to apply to names of logs")
+    String filter;
+    
+    @Parameter(names={"-h", "--host"}, description="host where chainsaw is running", required=true)
+    String hostname;
+    
+    @Parameter(names={"-p", "--port"}, description="port where XMLSocketReceiver is listening", required=true)
+    int portnum;
+    
+    @Parameter(names={"-s", "--start"}, description="start date filter (yyyyMMddHHmmss)", required=true, converter=DateConverter.class)
+    Date startDate;
     
-    Option dirOption = new Option("d", "logDirectory", true, "ACCUMULO log directory path");
-    dirOption.setArgName("dir");
-    dirOption.setRequired(true);
-    opts.addOption(dirOption);
-    
-    Option fileFilterOption = new Option("f", "fileFilter", true, "filter to apply to names of logs");
-    fileFilterOption.setArgName("filter");
-    fileFilterOption.setRequired(false);
-    opts.addOption(fileFilterOption);
-    
-    Option hostOption = new Option("h", "host", true, "host where chainsaw is running");
-    hostOption.setArgName("hostname");
-    hostOption.setRequired(true);
-    opts.addOption(hostOption);
-    
-    Option portOption = new Option("p", "port", true, "port where XMLSocketReceiver is listening");
-    portOption.setArgName("portnum");
-    portOption.setRequired(true);
-    opts.addOption(portOption);
-    
-    Option startOption = new Option("s", "start", true, "start date filter (yyyyMMddHHmmss)");
-    startOption.setArgName("date");
-    startOption.setRequired(true);
-    opts.addOption(startOption);
-    
-    Option endOption = new Option("e", "end", true, "end date filter (yyyyMMddHHmmss)");
-    endOption.setArgName("date");
-    endOption.setRequired(true);
-    opts.addOption(endOption);
-    
-    Option levelOption = new Option("l", "level", true, "filter log level");
-    levelOption.setArgName("level");
-    levelOption.setRequired(false);
-    opts.addOption(levelOption);
-    
-    Option msgFilter = new Option("m", "messageFilter", true, "regex filter for log messages");
-    msgFilter.setArgName("regex");
-    msgFilter.setRequired(false);
-    opts.addOption(msgFilter);
+    @Parameter(names={"-e", "--end"}, description="end date filter (yyyyMMddHHmmss)", required=true, converter=DateConverter.class)
+    Date endDate;
     
-    return opts;
+    @Parameter(names={"-l", "--level"}, description="filter log level")
+    String level;
     
+    @Parameter(names={"-m", "--messageFilter"}, description="regex filter for log messages")
+    String regex;
   }
   
+  
+  
+  
   /**
    * 
    * @param args
@@ -272,47 +267,10 @@ public class SendLogToChainsaw extends X
    * @throws Exception
    */
   public static void main(String[] args) throws Exception {
+    Opts opts = new Opts();
+    opts.parseArgs(SendLogToChainsaw.class.getName(), args);
     
-    Options o = getOptions();
-    CommandLine cl = null;
-    try {
-    cl = new BasicParser().parse(o, args);
-    } catch (MissingOptionException e) {
-    	System.out.println(e.toString());
-    	HelpFormatter formatter = new HelpFormatter();
-    	formatter.printHelp( "SendLogToChainsaw", o );
-    	return;
-    }
-    
-    String logDir = cl.getOptionValue(o.getOption("d").getOpt());
-    String fileNameFilter = null;
-    if (cl.hasOption(o.getOption("f").getOpt()))
-      fileNameFilter = cl.getOptionValue(o.getOption("f").getOpt());
-    String chainsawHost = cl.getOptionValue(o.getOption("h").getOpt());
-    int chainsawPort = 0;
-    try {
-      chainsawPort = Integer.parseInt(cl.getOptionValue(o.getOption("p").getOpt()));
-    } catch (NumberFormatException nfe) {
-      System.err.println("Unable to parse port number");
-      System.exit(-1);
-    }
-    SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
-    Date startDate = null;
-    if (cl.hasOption(o.getOption("s").getOpt())) {
-      startDate = formatter.parse(cl.getOptionValue(o.getOption("s").getOpt()));
-    }
-    Date endDate = null;
-    if (cl.hasOption(o.getOption("e").getOpt())) {
-      endDate = formatter.parse(cl.getOptionValue(o.getOption("e").getOpt()));
-    }
-    String msgFilter = null;
-    if (cl.hasOption(o.getOption("m").getOpt()))
-      msgFilter = cl.getOptionValue(o.getOption("m").getOpt());
-    String levelFilter = null;
-    if (cl.hasOption(o.getOption("l").getOpt()))
-      levelFilter = cl.getOptionValue(o.getOption("l").getOpt());
-    
-    SendLogToChainsaw c = new SendLogToChainsaw(logDir, fileNameFilter, chainsawHost, chainsawPort, startDate, endDate, msgFilter, levelFilter);
+    SendLogToChainsaw c = new SendLogToChainsaw(opts.dir, opts.filter, opts.hostname, opts.portnum, opts.startDate, opts.endDate, opts.regex, opts.level);
     c.processLogFiles();
   }
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java Wed Dec 19 16:25:03 2012
@@ -85,7 +85,9 @@ public class TServerUtils {
    */
   public static ServerPort startServer(AccumuloConfiguration conf, Property portHintProperty, TProcessor processor, String serverName, String threadName,
       Property portSearchProperty,
-      Property minThreadProperty, Property timeBetweenThreadChecksProperty) throws UnknownHostException {
+      Property minThreadProperty, 
+      Property timeBetweenThreadChecksProperty, 
+      Property maxMessageSizeProperty) throws UnknownHostException {
     int portHint = conf.getPort(portHintProperty);
     int minThreads = 2;
     if (minThreadProperty != null)
@@ -93,6 +95,9 @@ public class TServerUtils {
     long timeBetweenThreadChecks = 1000;
     if (timeBetweenThreadChecksProperty != null)
       timeBetweenThreadChecks = conf.getTimeInMillis(timeBetweenThreadChecksProperty);
+    long maxMessageSize = 10 * 1000 * 1000;
+    if (maxMessageSizeProperty != null)
+      maxMessageSize = conf.getMemoryInBytes(maxMessageSizeProperty);
     boolean portSearch = false;
     if (portSearchProperty != null)
       portSearch = conf.getBoolean(portSearchProperty);
@@ -111,7 +116,7 @@ public class TServerUtils {
         if (port > 65535)
           port = 1024 + port % (65535 - 1024);
         try {
-          return TServerUtils.startTServer(port, processor, serverName, threadName, minThreads, timeBetweenThreadChecks);
+          return TServerUtils.startTServer(port, processor, serverName, threadName, minThreads, timeBetweenThreadChecks, maxMessageSize);
         } catch (Exception ex) {
           log.info("Unable to use port " + port + ", retrying. (Thread Name = " + threadName + ")");
           UtilWaitThread.sleep(250);
@@ -178,7 +183,7 @@ public class TServerUtils {
   }
   
   public static ServerPort startHsHaServer(int port, TProcessor processor, final String serverName, String threadName, final int numThreads,
-      long timeBetweenThreadChecks) throws TTransportException {
+      long timeBetweenThreadChecks, long maxMessageSize) throws TTransportException {
     TNonblockingServerSocket transport = new TNonblockingServerSocket(port);
     THsHaServer.Args options = new THsHaServer.Args(transport);
     options.protocolFactory(ThriftUtil.protocolFactory());
@@ -239,9 +244,9 @@ public class TServerUtils {
     return new ServerPort(new TThreadPoolServer(options), port);
   }
   
-  public static ServerPort startTServer(int port, TProcessor processor, String serverName, String threadName, int numThreads, long timeBetweenThreadChecks)
+  public static ServerPort startTServer(int port, TProcessor processor, String serverName, String threadName, int numThreads, long timeBetweenThreadChecks, long maxMessageSize)
       throws TTransportException {
-    ServerPort result = startHsHaServer(port, processor, serverName, threadName, numThreads, timeBetweenThreadChecks);
+    ServerPort result = startHsHaServer(port, processor, serverName, threadName, numThreads, timeBetweenThreadChecks, maxMessageSize);
     // ServerPort result = startThreadPoolServer(port, processor, serverName, threadName, -1);
     final TServer finalServer = result.server;
     Runnable serveTask = new Runnable() {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TableDiskUsage.java Wed Dec 19 16:25:03 2012
@@ -16,28 +16,33 @@
  */
 package org.apache.accumulo.server.util;
 
-import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.List;
 
+import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 
+import com.beust.jcommander.Parameter;
+
 public class TableDiskUsage {
   
+  static class Opts extends ClientOpts {
+    @Parameter(description=" <table> { <table> ... } ")
+    List<String> tables = new ArrayList<String>();
+  }
+  
   /**
    * @param args
    */
   public static void main(String[] args) throws Exception {
     FileSystem fs = FileSystem.get(new Configuration());
-    
-    Instance instance = HdfsZooInstance.getInstance();
-    ServerConfiguration conf = new ServerConfiguration(instance);
-    Connector conn = instance.getConnector("root", "secret");
-    
-    org.apache.accumulo.core.util.TableDiskUsage.printDiskUsage(conf.getConfiguration(), Arrays.asList(args), fs, conn);
+    Opts opts = new Opts();
+    opts.parseArgs(TableDiskUsage.class.getName(), args);
+    Connector conn = opts.getConnector();
+    org.apache.accumulo.core.util.TableDiskUsage.printDiskUsage(DefaultConfiguration.getInstance(), opts.tables, fs, conn);
   }
   
 }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java Wed Dec 19 16:25:03 2012
@@ -19,22 +19,33 @@ package org.apache.accumulo.server.util;
 import java.util.List;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 
+import com.beust.jcommander.Parameter;
+
 public class TabletServerLocks {
   
+  static class Opts extends Help {
+    @Parameter(names="-list")
+    boolean list = false;
+    @Parameter(names="-delete")
+    String delete = null;
+  }
   /**
    * @param args
    */
   public static void main(String[] args) throws Exception {
     
     String tserverPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTSERVERS;
+    Opts opts = new Opts();
+    opts.parseArgs(TabletServerLocks.class.getName(), args);
     
-    if (args.length == 1 && args[0].equals("-list")) {
+    if (opts.list) {
       IZooReaderWriter zoo = ZooReaderWriter.getInstance();
       
       List<String> tabletServers = zoo.getChildren(tserverPath);
@@ -48,7 +59,7 @@ public class TabletServerLocks {
         
         System.out.printf("%32s %16s%n", tabletServer, holder);
       }
-    } else if (args.length == 2 && args[0].equals("-delete")) {
+    } else if (opts.delete != null) {
       ZooLock.deleteLock(tserverPath + "/" + args[1]);
     } else {
       System.out.println("Usage : " + TabletServerLocks.class.getName() + " -list|-delete <tserver lock>");

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java Wed Dec 19 16:25:03 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.accumulo.server.util;
 
-import java.io.PrintWriter;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -31,17 +30,15 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import jline.ConsoleReader;
-
 import org.apache.accumulo.cloudtrace.instrument.Tracer;
 import org.apache.accumulo.cloudtrace.thrift.TInfo;
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Range;
@@ -58,105 +55,52 @@ import org.apache.accumulo.core.tabletse
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
-import org.apache.commons.cli.BasicParser;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.MissingArgumentException;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 import org.apache.thrift.TServiceClient;
 
+import com.beust.jcommander.Parameter;
+
 public class VerifyTabletAssignments {
   
+  static class Opts extends ClientOpts {
+    @Parameter(names={"-v", "--verbose"}, description="verbose mode (prints locations of tablets)")
+    boolean verbose = false;
+  }
+  
   public static void main(String[] args) throws Exception {
-    Options opts = new Options();
-    
-    Option zooKeeperInstance = new Option("z", "zooKeeperInstance", true, "use a zookeeper instance with the given instance name and list of zoo hosts");
-    zooKeeperInstance.setArgName("name hosts");
-    zooKeeperInstance.setArgs(2);
-    opts.addOption(zooKeeperInstance);
-    
-    Option usernameOption = new Option("u", "user", true, "username (required)");
-    usernameOption.setArgName("user");
-    usernameOption.setRequired(true);
-    opts.addOption(usernameOption);
-    
-    Option passwOption = new Option("p", "password", true, "password (prompt for password if this option is missing)");
-    passwOption.setArgName("pass");
-    opts.addOption(passwOption);
-    
-    Option verboseOption = new Option("v", "verbose", false, "verbose mode (prints locations of tablets)");
-    opts.addOption(verboseOption);
-    
-    CommandLine cl = null;
-    String user = null;
-    String passw = null;
-    Instance instance = null;
-    ConsoleReader reader = new ConsoleReader();
-    try {
-      cl = new BasicParser().parse(opts, args);
-      
-      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2)
-        throw new MissingArgumentException(zooKeeperInstance);
-      
-      user = cl.getOptionValue(usernameOption.getOpt());
-      passw = cl.getOptionValue(passwOption.getOpt());
-      
-      if (cl.hasOption(zooKeeperInstance.getOpt())) {
-        String[] zkOpts = cl.getOptionValues(zooKeeperInstance.getOpt());
-        instance = new ZooKeeperInstance(zkOpts[0], zkOpts[1]);
-      } else {
-        instance = HdfsZooInstance.getInstance();
-      }
-      
-      if (passw == null)
-        passw = reader.readLine("Enter current password for '" + user + "'@'" + instance.getInstanceName() + "': ", '*');
-      if (passw == null) {
-        reader.printNewline();
-        return;
-      } // user canceled
-      
-      if (cl.getArgs().length != 0)
-        throw new ParseException("Unrecognized arguments: " + cl.getArgList());
-      
-    } catch (ParseException e) {
-      PrintWriter pw = new PrintWriter(System.err);
-      new HelpFormatter().printHelp(pw, Integer.MAX_VALUE, "accumulo " + VerifyTabletAssignments.class.getName(), null, opts, 2, 5, null, true);
-      pw.flush();
-      System.exit(1);
-    }
-    
-    Connector conn = instance.getConnector(user, passw.getBytes());
-    ServerConfiguration conf = new ServerConfiguration(instance);
+    Opts opts = new Opts();
+    opts.parseArgs(VerifyTabletAssignments.class.getName(), args);
+
+    Connector conn = opts.getConnector();
     for (String table : conn.tableOperations().list())
-      checkTable(conf.getConfiguration(), user, passw, table, null, cl.hasOption(verboseOption.getOpt()));
+      checkTable(opts, table, null);
     
   }
   
-  private static void checkTable(final AccumuloConfiguration conf, final String user, final String pass, String table, HashSet<KeyExtent> check, boolean verbose)
+  private static void checkTable(final Opts opts, String tableName, HashSet<KeyExtent> check)
       throws AccumuloException,
       AccumuloSecurityException, TableNotFoundException, InterruptedException {
     
     if (check == null)
-      System.out.println("Checking table " + table);
+      System.out.println("Checking table " + tableName);
     else
-      System.out.println("Checking table " + table + " again, failures " + check.size());
+      System.out.println("Checking table " + tableName + " again, failures " + check.size());
     
     Map<KeyExtent,String> locations = new TreeMap<KeyExtent,String>();
     SortedSet<KeyExtent> tablets = new TreeSet<KeyExtent>();
     
-    MetadataTable.getEntries(HdfsZooInstance.getInstance(),
-        new AuthInfo(user, ByteBuffer.wrap(pass.getBytes()), HdfsZooInstance.getInstance().getInstanceID()), table, false, locations, tablets);
+    Connector conn = opts.getConnector();
+    Instance inst = conn.getInstance();
+    MetadataTable.getEntries(conn.getInstance(),
+        new AuthInfo(opts.user, ByteBuffer.wrap(opts.getPassword()), inst.getInstanceID()), tableName, false, locations, tablets);
     
     final HashSet<KeyExtent> failures = new HashSet<KeyExtent>();
     
     for (KeyExtent keyExtent : tablets)
       if (!locations.containsKey(keyExtent))
         System.out.println(" Tablet " + keyExtent + " has no location");
-      else if (verbose)
+      else if (opts.verbose)
         System.out.println(" Tablet " + keyExtent + " is located at " + locations.get(keyExtent));
     
     Map<String,List<KeyExtent>> extentsPerServer = new TreeMap<String,List<KeyExtent>>();
@@ -173,14 +117,14 @@ public class VerifyTabletAssignments {
     }
     
     ExecutorService tp = Executors.newFixedThreadPool(20);
-    
+    final ServerConfiguration conf = new ServerConfiguration(inst);
     for (final Entry<String,List<KeyExtent>> entry : extentsPerServer.entrySet()) {
       Runnable r = new Runnable() {
         
         @Override
         public void run() {
           try {
-            checkTabletServer(conf, user, ByteBuffer.wrap(pass.getBytes()), entry, failures);
+            checkTabletServer(conf.getConfiguration(), opts.user, ByteBuffer.wrap(opts.getPassword()), entry, failures);
           } catch (Exception e) {
             System.err.println("Failure on ts " + entry.getKey() + " " + e.getMessage());
             e.printStackTrace();
@@ -198,7 +142,7 @@ public class VerifyTabletAssignments {
     while (!tp.awaitTermination(1, TimeUnit.HOURS)) {}
     
     if (failures.size() > 0)
-      checkTable(conf, user, pass, table, failures, verbose);
+      checkTable(opts, tableName, failures);
   }
   
   private static void checkFailures(String server, HashSet<KeyExtent> failures, MultiScanResult scanResult) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java Wed Dec 19 16:25:03 2012
@@ -19,12 +19,15 @@ package org.apache.accumulo.server.util;
 import java.util.List;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
-import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 
+import com.beust.jcommander.JCommander;
+import com.beust.jcommander.Parameter;
+
 public class ZooZap {
   
   static boolean verbose = false;
@@ -37,49 +40,44 @@ public class ZooZap {
       System.out.println(msg);
   }
   
-  public static void main(String[] args) {
-    
+  static class Opts extends ClientOpts {
+    @Parameter(names="-master", description="remove master locks")
     boolean zapMaster = false;
+    @Parameter(names="-tserver", description="remove tablet server locks")
     boolean zapTservers = false;
+    @Parameter(names="-tracers", description="remove tracer locks")
     boolean zapTracers = false;
+    @Parameter(names="-verbose", description="print out messages about progress")
+    boolean verbose = false;
+  }
+  
+  public static void main(String[] args) {
+    Opts opts = new Opts();
+    opts.parseArgs(ZooZap.class.getName(), args);
     
-    if (args.length == 0) {
-      printUsage();
-      return;
-    }
-    
-    for (int i = 0; i < args.length; i++) {
-      if (args[i].equals("-tservers")) {
-        zapTservers = true;
-      } else if (args[i].equals("-master")) {
-        zapMaster = true;
-      } else if (args[i].equals("-tracers")) {
-        zapTracers = true;
-      } else if (args[i].equals("-verbose")) {
-        verbose = true;
-      } else {
-        printUsage();
+    if (!opts.zapMaster && !opts.zapTservers && !opts.zapTracers)
+    {
+        new JCommander(opts).usage();
         return;
-      }
     }
     
+    String iid = opts.getInstance().getInstanceID();
     IZooReaderWriter zoo = ZooReaderWriter.getInstance();
-    String iid = HdfsZooInstance.getInstance().getInstanceID();
     
-    if (zapMaster) {
+    if (opts.zapMaster) {
       String masterLockPath = Constants.ZROOT + "/" + iid + Constants.ZMASTER_LOCK;
       
       zapDirectory(zoo, masterLockPath);
     }
     
-    if (zapTservers) {
+    if (opts.zapTservers) {
       String tserversPath = Constants.ZROOT + "/" + iid + Constants.ZTSERVERS;
       try {
         List<String> children = zoo.getChildren(tserversPath);
         for (String child : children) {
           message("Deleting " + tserversPath + "/" + child + " from zookeeper");
           
-          if (zapMaster)
+          if (opts.zapMaster)
             ZooReaderWriter.getInstance().recursiveDelete(tserversPath + "/" + child, NodeMissingPolicy.SKIP);
           else {
             String path = tserversPath + "/" + child;
@@ -95,7 +93,7 @@ public class ZooZap {
       }
     }
     
-    if (zapTracers) {
+    if (opts.zapTracers) {
       String path = Constants.ZROOT + "/" + iid + Constants.ZTRACERS;
       zapDirectory(zoo, path);
     }
@@ -113,9 +111,4 @@ public class ZooZap {
       e.printStackTrace();
     }
   }
-  
-  private static void printUsage() {
-    System.err.println("Usage : " + ZooZap.class.getName() + " [-verbose] [-tservers] [-master] [-tracers]");
-  }
-  
 }

Modified: accumulo/trunk/start/src/main/java/org/apache/accumulo/start/TestMain.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/main/java/org/apache/accumulo/start/TestMain.java?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/start/src/main/java/org/apache/accumulo/start/TestMain.java (original)
+++ accumulo/trunk/start/src/main/java/org/apache/accumulo/start/TestMain.java Wed Dec 19 16:25:03 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.start;
 
-/** This program tests that the proper exit code is propogated to the shell.
+/** This program tests that the proper exit code is propagated to the shell.
  *
  * $ ./bin/accumulo org.apache.accumulo.start.TestMain
  * $ ./bin/accumulo org.apache.accumulo.start.TestMain badExit

Modified: accumulo/trunk/test/system/auto/JavaTest.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/JavaTest.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/JavaTest.py (original)
+++ accumulo/trunk/test/system/auto/JavaTest.py Wed Dec 19 16:25:03 2012
@@ -49,7 +49,7 @@ class JavaTest(TestUtilsMixin, unittest.
         assert handle.returncode==0
 
     def runJTest(self,host, cmd):
-        return self.runClassOn(host, 'org.apache.accumulo.server.test.functional.FunctionalTest', ['-m',host,'-u',ROOT,'-p',ROOT_PASSWORD,'-i',INSTANCE_NAME,self.testClass,cmd])
+        return self.runClassOn(host, 'org.apache.accumulo.server.test.functional.FunctionalTest', ['-u',ROOT,'-p',ROOT_PASSWORD,'-i',INSTANCE_NAME,'--classname', self.testClass,'--opt', cmd])
         
     def runTest(self):
         handle = self.runJTest(self.masterHost(),'run')

Modified: accumulo/trunk/test/system/auto/TestUtils.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/TestUtils.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/TestUtils.py (original)
+++ accumulo/trunk/test/system/auto/TestUtils.py Wed Dec 19 16:25:03 2012
@@ -48,8 +48,18 @@ WALOG = os.path.join(ACCUMULO_HOME, 'wal
 LOG_PROPERTIES= os.path.join(ACCUMULO_HOME, 'conf', 'log4j.properties')
 LOG_GENERIC = os.path.join(ACCUMULO_HOME, 'conf', 'generic_logger.xml')
 LOG_MONITOR = os.path.join(ACCUMULO_HOME, 'conf', 'monitor_logger.xml')
-General_CLASSPATH = ("$ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar, $ACCUMULO_HOME/lib/[^.].*.jar, $ZOOKEEPER_HOME/zookeeper[^.].*.jar,"
-"$HADOOP_HOME/conf,$HADOOP_HOME/[^.].*.jar, $HADOOP_HOME/lib/[^.].*.jar") 
+General_CLASSPATH = """
+    $ACCUMULO_HOME/server/target/classes/,
+    $ACCUMULO_HOME/core/target/classes/,
+    $ACCUMULO_HOME/start/target/classes/,
+    $ACCUMULO_HOME/examples/instamo/target/classes,
+    $ACCUMULO_HOME/examples/simple/target/classes,
+    $ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar, 
+    $ACCUMULO_HOME/lib/[^.].*.jar, 
+    $ZOOKEEPER_HOME/zookeeper[^.].*.jar,"
+    $HADOOP_HOME/conf,$HADOOP_HOME/[^.].*.jar, 
+    $HADOOP_HOME/lib/[^.].*.jar
+"""
 
 log = logging.getLogger('test.auto')
 
@@ -98,7 +108,7 @@ class TestUtilsMixin:
         cmd = map(str, cmd)
         log.debug('%s: %s', host, ' '.join(cmd))
         if host == 'localhost':
-            os.environ['ACCUMULO_TSERVER_OPTS']='-Xmx700m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 '
+            os.environ['ACCUMULO_TSERVER_OPTS']='-Xmx800m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 '
             os.environ['ACCUMULO_GENERAL_OPTS']=('-Dorg.apache.accumulo.config.file=%s' % (SITE))
             os.environ['ACCUMULO_LOG_DIR']= ACCUMULO_HOME + '/logs/' + ID
             return Popen(cmd, stdout=PIPE, stderr=PIPE, **opts)
@@ -155,7 +165,7 @@ class TestUtilsMixin:
 
 
     def pkill(self, host, pattern, signal=signal.SIGKILL):
-        cmd = [os.path.join(ACCUMULO_HOME, 'test', 'system', 'auto', 'pkill.sh'), str(signal), str(os.getuid()), ID + '.*' + pattern]
+        cmd = [os.path.join(ACCUMULO_HOME, 'test', 'system', 'auto', 'pkill.sh'), str(signal), str(os.getuid()), pattern + '.*' + ID]
         handle = self.runOn(host, cmd)
         handle.communicate()
 
@@ -187,7 +197,7 @@ class TestUtilsMixin:
         self.cleanupAccumuloHandles(0.5)
 
     def stop_monitor(self, host):
-        self.pkill(host, 'Main monitor$', signal=signal.SIGHUP)
+        self.pkill(host, 'app=monitor', signal=signal.SIGHUP)
         # wait for it to stop
         self.sleep(0.5)
         self.cleanupAccumuloHandles(0.5)
@@ -208,24 +218,24 @@ class TestUtilsMixin:
         klass = 'org.apache.accumulo.server.test.TestIngest'
         args = ''
         if timestamp:
-            args += "-timestamp %ld " % int(timestamp)
-        args += '-tsbw -size %d -random 56 %d %d 1 ' % (size, count, start)
+            args += "-ts %ld " % int(timestamp)
+        args += '--debug -i %s -u %s --size %d --random 56 --rows %d --start %d --cols 1 --createTable ' % (INSTANCE_NAME, ROOT, size, count, start)
         if colf:
-           args = '-colf %s ' % colf + args
+           args = '--columnFamily %s ' % colf + args
         return self.runClassOn(host, klass, args.split(), **kwargs)
 
     def verify(self, host, count, start=0, size=50, timestamp=None, colf='colf'):
         klass = 'org.apache.accumulo.server.test.VerifyIngest'
         args = ''
         if timestamp:
-            args += "-timestamp %ld " % int(timestamp)
-        args += '-size %d -random 56 -colf %s %d %d 1 ' % (size, colf, count, start)
+            args += "-ts %ld " % int(timestamp)
+        args += '-i %s -u %s --size %d --random 56 -cf %s --rows %d --start %d --cols 1 ' % (INSTANCE_NAME, ROOT, size, colf, count, start)
         return self.runClassOn(host, klass, args.split())
 
     def stop_accumulo(self, signal=signal.SIGHUP):
         log.info('killing accumulo processes everywhere')
         for host in self.hosts:
-            self.pkill(host, 'org.apache.accumulo.start', signal)
+            self.pkill(host, 'accumulo.config.file', signal)
 
     def create_config_file(self, settings):
         fp = open(os.path.join(ACCUMULO_HOME, 'conf', SITE),
@@ -367,6 +377,10 @@ class TestUtilsMixin:
         if not handles:
            if handle.returncode is None:
               handle.communicate()
+	   if handle.stdout:
+	      handle.stdout.close()
+	   if handle.stderr:
+              handle.stderr.close()
            self.assert_(self.processResult(out, err, handle.returncode))
            return out, err
         self.fail("Process failed to finish in %s seconds" % secs)
@@ -380,17 +394,20 @@ class TestUtilsMixin:
         self.cleanupAccumuloHandles()
         # give everyone a couple seconds to completely stop
         for h in self.accumuloHandles:
-            self.waitForStop(h, 60)
+            self.waitForStop(h, 10)
 
     def clean_logging(self):
       LOG_PROPERTIES_BACKUP='%s.bkp' % LOG_PROPERTIES 
       LOG_GENERIC_BACKUP='%s.bkp' % LOG_GENERIC
       LOG_MONITOR_BACKUP='%s.bkp' % LOG_MONITOR
-      os.remove(LOG_PROPERTIES)
-      os.remove(LOG_GENERIC)
-      os.remove(LOG_MONITOR)
+      if os.path.exists(LOG_PROPERTIES):
+         os.remove(LOG_PROPERTIES)
+      if os.path.exists(LOG_GENERIC):
+         os.remove(LOG_GENERIC)
+      if os.path.exists(LOG_MONITOR):
+         os.remove(LOG_MONITOR)
       if os.path.exists(LOG_PROPERTIES_BACKUP):
-        os.rename(LOG_PROPERTIES_BACKUP, LOG_PROPERTIES)
+         os.rename(LOG_PROPERTIES_BACKUP, LOG_PROPERTIES)
       if os.path.exists(LOG_GENERIC_BACKUP):
          os.rename(LOG_GENERIC_BACKUP, LOG_GENERIC)
       if os.path.exists(LOG_MONITOR_BACKUP):
@@ -413,7 +430,7 @@ class TestUtilsMixin:
                                ['hadoop', 'fs', '-rmr', ACCUMULO_DIR]))
           self.wait(self.runClassOn(self.masterHost(),
                                     'org.apache.accumulo.server.util.DeleteZooInstance',
-                                    [INSTANCE_NAME]))
+                                    ['-i', INSTANCE_NAME]))
           self.wait(self.runOn(self.masterHost(), ['rm', '-rf', WALOG]))
           self.wait(self.runOn(self.masterHost(), ['rm', '-rf', ACCUMULO_HOME + '/logs/' + ID]))
           self.clean_logging() 
@@ -432,7 +449,7 @@ class TestUtilsMixin:
     def getTableId(self, table):
         if table == '!METADATA' :
             return '!0'
-        handle = self.runClassOn(self.masterHost(), 'org.apache.accumulo.server.test.ListTables',[]);
+        handle = self.runClassOn(self.masterHost(), 'org.apache.accumulo.server.test.ListTables',['-u', ROOT]);
         out,err = handle.communicate()
         self.assert_(handle.returncode==0)
         for line in out.split('\n') :

Modified: accumulo/trunk/test/system/auto/simple/binary.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/binary.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/binary.py (original)
+++ accumulo/trunk/test/system/auto/simple/binary.py Wed Dec 19 16:25:03 2012
@@ -32,8 +32,11 @@ class BinaryTest(unittest.TestCase, Test
         
         # initialize the database
         self.createTable("bt")
-    def test(self, *args):
-        handle = self.runClassOn(self.masterHost(), testClass, list(args))
+    def test(self, mode, table, min, max):
+        handle = self.runClassOn(self.masterHost(), testClass, 
+                                 ['-u', 'root',
+                                  '--mode', mode, '-t', table, 
+                                  '--start', min, '--count', max])
         self.waitForStop(handle, 200)
         
     def tearDown(self):
@@ -49,7 +52,6 @@ class BinaryTest(unittest.TestCase, Test
         self.test("verify","bt","75000","25000")
         self.test("randomLookups","bt","75000","25000")
         self.test("verifyDeleted","bt","25000","50000")
-        self.shutdown_accumulo()
 
 class BinaryPreSplitTest(BinaryTest):
     "Test inserting binary data into accumulo with a presplit table (this will place binary data in !METADATA)"

Modified: accumulo/trunk/test/system/auto/simple/bulk.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/bulk.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/bulk.py (original)
+++ accumulo/trunk/test/system/auto/simple/bulk.py Wed Dec 19 16:25:03 2012
@@ -19,7 +19,7 @@ import logging
 import unittest
 import time
 
-from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD
+from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, INSTANCE_NAME
 
 log = logging.getLogger('test.auto')
 
@@ -41,14 +41,14 @@ class SimpleBulkTest(TestUtilsMixin, uni
         handle = self.runClassOn(
             self.masterHost(),
             'org.apache.accumulo.server.test.BulkImportDirectory',
-            [ROOT, ROOT_PASSWORD,
-             'test_ingest', dir, '/testBulkFail'])
+            ['-u', ROOT, '-p', ROOT_PASSWORD,
+             '-t', 'test_ingest', '--source', dir, '--failures', '/testBulkFail', '-i', INSTANCE_NAME])
         self.wait(handle)
         self.assert_(handle.returncode == 0)
         
 
     def createRFiles(self):
-        args = '-rFile /testrf/rf%02d -timestamp 1 -size 50 -random 56 %1d %ld 1'
+        args = '--rfile /testrf/rf%02d --timestamp 1 --size 50 --random 56 --rows %1d --start %ld --cols 1 -u root -i ' + INSTANCE_NAME
         log.info('creating rfiles')
         handles = []
         for i in range(COUNT):

Modified: accumulo/trunk/test/system/auto/simple/compaction.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/compaction.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/compaction.py (original)
+++ accumulo/trunk/test/system/auto/simple/compaction.py Wed Dec 19 16:25:03 2012
@@ -44,7 +44,7 @@ class CompactionTest(SimpleBulkTest):
         handle = self.runClassOn(
             self.masterHost(),
             'org.apache.accumulo.server.test.CreateRFiles',
-            "testrf 4 0 500000 59".split())
+            "--output testrf --numThreads 4 --start 0 --end 500000 --splits 59".split())
         out, err = handle.communicate()
         self.assert_(handle.returncode == 0)
 

Modified: accumulo/trunk/test/system/auto/simple/delete.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/delete.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/delete.py (original)
+++ accumulo/trunk/test/system/auto/simple/delete.py Wed Dec 19 16:25:03 2012
@@ -19,7 +19,7 @@ import logging
 import unittest
 import time
 
-from TestUtils import TestUtilsMixin
+from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, INSTANCE_NAME, ZOOKEEPERS
 
 log = logging.getLogger('test.auto')
 
@@ -47,7 +47,7 @@ class DeleteTest(readwrite.SunnyDayTest)
         self.waitForStop(self.ingester, 200)
 
         log.info("Deleting data")
-        self.waitForStop(self.runClassOn(self.masterHost(), "org.apache.accumulo.server.test.TestRandomDeletes", []),
+        self.waitForStop(self.runClassOn(self.masterHost(), "org.apache.accumulo.server.test.TestRandomDeletes", ['-u', ROOT, '-p', ROOT_PASSWORD, '-i', INSTANCE_NAME, '-z', ZOOKEEPERS]),
                          400)
 
         log.info("Inserting data")

Modified: accumulo/trunk/test/system/auto/simple/deleterows.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/deleterows.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/deleterows.py (original)
+++ accumulo/trunk/test/system/auto/simple/deleterows.py Wed Dec 19 16:25:03 2012
@@ -26,7 +26,7 @@ class DeleteRowsTest(JavaTest):
 class DeleteRowsSplitTest(JavaTest):
     "Test Delete Rows Split"
 
-    maxRuntime = 180
+    maxRuntime = 300
     order = 92
     testClass="org.apache.accumulo.server.test.functional.DeleteRowsSplitTest"
 

Modified: accumulo/trunk/test/system/auto/simple/dynamicThreadPools.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/dynamicThreadPools.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/dynamicThreadPools.py (original)
+++ accumulo/trunk/test/system/auto/simple/dynamicThreadPools.py Wed Dec 19 16:25:03 2012
@@ -49,7 +49,7 @@ class DynamicThreadPools(SunnyDayTest):
     def runTest(self):
         self.waitForStop(self.ingester, self.waitTime())
         # make a bunch of work for compaction
-        self.shell(self.masterHost(), 
+        out, err, returncode =  self.shell(self.masterHost(), 
 		   'clonetable test_ingest test_ingest1\n'
 		   'clonetable test_ingest test_ingest2\n'
  		   'clonetable test_ingest test_ingest3\n'
@@ -60,12 +60,14 @@ class DynamicThreadPools(SunnyDayTest):
 		   'sleep 10\n'
 		   'compact -p .*\n'
 		   'sleep 2\n')
-	handle = self.runOn(self.masterHost(), [self.accumulo_sh(), 'org.apache.accumulo.server.test.GetMasterStats'])
-        out, err = self.waitForStop(handle, 120)
+	log.info('shell says: ' + out)
         count = 0
-        for line in out.split('\n'):
-	   if line.find('Major Compacting') >= 0:
-		count += int(line.split()[2])
+	while count == 0:
+	   handle = self.runOn(self.masterHost(), [self.accumulo_sh(), 'org.apache.accumulo.server.test.GetMasterStats', '-u', 'root'])
+           out, err = self.waitForStop(handle, 120)
+           for line in out.split('\n'):
+	      if line.find('Major Compacting') >= 0:
+		 count += int(line.split()[2])
         self.assert_(count == 1)
 
 def suite():

Modified: accumulo/trunk/test/system/auto/simple/examples.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/examples.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/examples.py (original)
+++ accumulo/trunk/test/system/auto/simple/examples.py Wed Dec 19 16:25:03 2012
@@ -63,7 +63,7 @@ class Examples(TestUtilsMixin, unittest.
 	self.comment("Testing MaxMutation constraint")
 	self.ashell('createtable test_ingest\n'
                     'constraint -a org.apache.accumulo.examples.simple.constraints.MaxMutationSize\n')
-        handle = self.runOn('localhost', [self.accumulo_sh(), 'org.apache.accumulo.server.test.TestIngest', '1', '0', '10000'])
+        handle = self.runOn('localhost', [self.accumulo_sh(), 'org.apache.accumulo.server.test.TestIngest', '-u', ROOT, '--rows', '1', '--start', '0', '--cols', '10000'])
         out, err = handle.communicate()
         self.failIf(handle.returncode==0)
         self.failUnless(err.find("MutationsRejectedException: # constraint violations : 1") >= 0, "Was able to insert a mutation larger than max size")
@@ -72,17 +72,17 @@ class Examples(TestUtilsMixin, unittest.
         self.comment("Testing dirlist example (a little)")
         self.comment("  ingesting accumulo source")
         self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.dirlist.Ingest',
-                     INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD,
-                     'dirTable',
-                     'indexTable',
-                     'dataTable',
-                     visibility,
-                     100000,
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-u', ROOT, '-p', ROOT_PASSWORD,
+                     '--dirTable', 'dirTable',
+                     '--indexTable', 'indexTable',
+                     '--dataTable', 'dataTable',
+                     '--vis', visibility,
+                     '--chunkSize', 100000,
                      ACCUMULO_HOME+"/fate")
         self.comment("  searching for a file")
         handle = self.runOn('localhost', [self.accumulo_sh(), 'org.apache.accumulo.examples.simple.dirlist.QueryUtil',
-                                          INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD,
-                                          'indexTable', auths, 'Fate.java', '-search'])
+                                          '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-u', ROOT, '-p', ROOT_PASSWORD,
+                                          '-t', 'indexTable', '--auths', auths, '--search', '--path', 'Fate.java'])
         out, err = handle.communicate()
         self.assert_(handle.returncode == 0)
         self.assert_(out.find('accumulo/fate/Fate.java') >= 0)
@@ -103,36 +103,37 @@ class Examples(TestUtilsMixin, unittest.
 
         self.comment("Testing bloom filters are fast for missing data")
         self.ashell('createtable bloom_test\nconfig -t bloom_test -s table.bloom.enabled=true\n')
-        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.client.RandomBatchWriter', '-s', '7',
-                     INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD, 'bloom_test',
-                     '1000000', '0', '1000000000', '50', '2000000', '60000', '3', 'A')
+        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.client.RandomBatchWriter', '--seed', '7',
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-u', ROOT, '-p', ROOT_PASSWORD, '-t', 'bloom_test',
+                     '--num', '1000000', '--min', '0', '--max', '1000000000', '--size', '50', '--batchMemory', '2M', '--batchLatency', '60s', 
+                     '--batchThreads', '3')
         self.ashell('flush -t bloom_test -w\n')
         now = time.time()
-        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.client.RandomBatchScanner', '-s', '7',
-                     INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD, 'bloom_test',
-                     500, 0, 1000000000, 50, 20, 'A')
+        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.client.RandomBatchScanner', '--seed', '7',
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-u', ROOT, '-p', ROOT_PASSWORD, '-t', 'bloom_test',
+                     '--num', '500', '--min', '0', '--max', '1000000000', '--size', '50', '--scanThreads', 4)
         diff = time.time() - now
         now = time.time()
-        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.client.RandomBatchScanner', '-s', '8',
-                     INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD, 'bloom_test',
-                     500, 0, 1000000000, 50, 20, 'A')
+        self.execute(self.accumulo_sh(), 'org.apache.accumulo.examples.simple.client.RandomBatchScanner', '--seed', '8',
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-u', ROOT, '-p', ROOT_PASSWORD, '-t', 'bloom_test',
+                     '--num', '500', '--min', '0', '--max', '1000000000', '--size', '50', '--scanThreads', 4)
         diff2 = time.time() - now
         self.assert_(diff2 < diff)
 
         self.comment("Creating a sharded index of the accumulo java files")
         self.ashell('createtable shard\ncreatetable doc2term\nquit\n')
         self.execute('/bin/sh', '-c',
-                     'find src -name "*.java" | xargs ./bin/accumulo org.apache.accumulo.simple.examples.shard.Index %s %s shard %s %s 30' %
+                     'find src -name "*.java" | xargs ./bin/accumulo org.apache.accumulo.simple.examples.shard.Index -i %s -z %s -t shard -u %s -p %s --partitions 30' %
                      (INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD))
         self.execute(self.accumulo_sh(), 'org.apache.accumulo.simple.examples.shard.Query',
-                     INSTANCE_NAME, ZOOKEEPERS, 'shard', ROOT, ROOT_PASSWORD,
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-t', 'shard', '-u', ROOT, '-p', ROOT_PASSWORD,
                      'foo', 'bar')
         self.comment("Creating a word index of the sharded files")
         self.execute(self.accumulo_sh(), 'org.apache.accumulo.simple.examples.shard.Reverse',
-                     INSTANCE_NAME, ZOOKEEPERS, 'shard', 'doc2term', ROOT, ROOT_PASSWORD)
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-t', 'shard', '--doc2Term', 'doc2term', '-u', ROOT, '-p', ROOT_PASSWORD)
         self.comment("Making 1000 conjunctive queries of 5 random words")
         self.execute(self.accumulo_sh(), 'org.apache.accumulo.simple.examples.shard.ContinuousQuery',
-                     INSTANCE_NAME, ZOOKEEPERS, 'shard', 'doc2term', ROOT, ROOT_PASSWORD, 5, 1000)
+                     '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-t', 'shard', '--doc2Term', 'doc2term', '-u', ROOT, '-p', ROOT_PASSWORD, '--term', 5, '--count', 1000)
 
         self.execute('hadoop', 'fs', '-rmr', "/tmp/input", "/tmp/files", "/tmp/splits.txt", "/tmp/failures")
         self.execute('hadoop', 'fs', '-mkdir', "/tmp/input")
@@ -155,41 +156,38 @@ class Examples(TestUtilsMixin, unittest.
             ACCUMULO_HOME+'/bin/tool.sh',
             examplesJar,
             'org.apache.accumulo.simple.examples.mapreduce.TeraSortIngest',
-            ROWS,  
-            10, 10,
-            78, 78,
-            'sorted',
-            INSTANCE_NAME,
-            ZOOKEEPERS,
-            ROOT,
-            ROOT_PASSWORD,
-            4]))
+            '--count', ROWS,  
+            '-nk', 10, '-xk', 10,
+            '-nk', 78, '-xk', 78,
+            '-t', 'sorted',
+            '-i', INSTANCE_NAME,
+            '-z', ZOOKEEPERS,
+            '-u', ROOT,
+            '-p', ROOT_PASSWORD,
+            '--splits', 4]))
         self.comment("Looking for '999' in all rows")
         self.wait(self.runOn(self.masterHost(), [
             ACCUMULO_HOME+'/bin/tool.sh',
             examplesJar,
             'org.apache.accumulo.simple.examples.mapreduce.RegexExample',
-            INSTANCE_NAME,
-            ZOOKEEPERS,
-            ROOT,
-            ROOT_PASSWORD,
-            'sorted',
-            '.*999.*',
-            '.*',
-            '.*',
-            '.*',
+            '-i', INSTANCE_NAME,
+            '-z', ZOOKEEPERS,
+            '-u', ROOT,
+            '-p', ROOT_PASSWORD,
+            '-t', 'sorted',
+            '--rowRegex', '.*999.*',
             '/tmp/nines']))
         self.comment("Generating hashes of each row into a new table")
         self.wait(self.runOn(self.masterHost(), [
             ACCUMULO_HOME+'/bin/tool.sh',
             examplesJar,
             'org.apache.accumulo.simple.examples.mapreduce.RowHash',
-            INSTANCE_NAME,
-            ZOOKEEPERS,
-            ROOT,
-            ROOT_PASSWORD,
-            'sorted',
-            ':',
+            '-i', INSTANCE_NAME,
+            '-z', ZOOKEEPERS,
+            '-u', ROOT,
+            '-p', ROOT_PASSWORD,
+            '-t', 'sorted',
+            '--column', ':',
             'sortedHashed',
             ]))
         self.comment("Exporting the table to HDFS")
@@ -197,13 +195,12 @@ class Examples(TestUtilsMixin, unittest.
             ACCUMULO_HOME+'/bin/tool.sh',
             examplesJar,
             'org.apache.accumulo.simple.examples.mapreduce.TableToFile',
-            INSTANCE_NAME,
-            ZOOKEEPERS,
-            ROOT,
-            ROOT_PASSWORD,
-            'sortedHashed',
-            ',',
-            '/tmp/tableFile'
+            '-i', INSTANCE_NAME,
+            '-z', ZOOKEEPERS,
+            '-u', ROOT,
+            '-p', ROOT_PASSWORD,
+            '-t', 'sorted',
+            '--output', '/tmp/tableFile'
             ]))
         self.comment("Running WordCount using Accumulo aggregators")
         self.wait(self.runOn(self.masterHost(), [
@@ -220,50 +217,49 @@ class Examples(TestUtilsMixin, unittest.
             ACCUMULO_HOME+'/bin/tool.sh',
             examplesJar,
             'org.apache.accumulo.simple.examples.mapreduce.WordCount',
-            INSTANCE_NAME,
-            ZOOKEEPERS,
-            '/tmp/wc',
-            'wctable'
+            '-i', INSTANCE_NAME,
+            '-z', ZOOKEEPERS,
+            '--input', '/tmp/wc',
+            '-t', 'wctable'
             ]))
         self.comment("Inserting data with a batch writer")
         self.runExample(['org.apache.accumulo.simple.examples.helloworld.InsertWithBatchWriter',
-                        INSTANCE_NAME,
-                        ZOOKEEPERS,
-                        'helloBatch',
-                        ROOT,
-                        ROOT_PASSWORD])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-t', 'helloBatch',
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD])
         self.comment("Reading data")
         self.runExample(['org.apache.accumulo.simple.examples.helloworld.ReadData',
-                         INSTANCE_NAME,
-                         ZOOKEEPERS,
-                        'helloBatch',
-                         ROOT,
-                         ROOT_PASSWORD])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-t', 'helloBatch',
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD])
         self.comment("Running isolated scans")
         self.runExample(['org.apache.accumulo.simple.examples.isolation.InterferenceTest',
-                         INSTANCE_NAME,
-                         ZOOKEEPERS,
-                         ROOT,
-                         ROOT_PASSWORD,
-                         'itest1',
-                         100000,
-                         'true'])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD,
+                         '-t', 'itest1',
+                         '--iterations', 100000,
+                         '--isolated'])
         self.comment("Running scans without isolation")
         self.runExample(['org.apache.accumulo.simple.examples.isolation.InterferenceTest',
-                         INSTANCE_NAME,
-                         ZOOKEEPERS,
-                         ROOT,
-                         ROOT_PASSWORD,
-                         'itest2',
-                         100000,
-                         'false'])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD,
+                         '-t', 'itest2',
+                         '--iterations', 100000])
         self.comment("Inserting data using a map/reduce job")
         self.runExample(['org.apache.accumulo.simple.examples.helloworld.InsertWithOutputFormat',
-                         INSTANCE_NAME,
-                         ZOOKEEPERS,
-                        'helloOutputFormat',
-                         ROOT,
-                         ROOT_PASSWORD])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-t', 'helloOutputFormat',
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD ])
         self.comment("Using some example constraints")
         self.ashell('\n'.join([
             'createtable testConstraints',
@@ -276,35 +272,35 @@ class Examples(TestUtilsMixin, unittest.
             ]))
         self.comment("Performing some row operations")
         self.runExample(['org.apache.accumulo.simple.examples.client.RowOperations', 
-                           INSTANCE_NAME,
-                           ZOOKEEPERS,
-                           ROOT,
-                           ROOT_PASSWORD])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD ])
         self.comment("Using the batch writer")
         self.runExample(['org.apache.accumulo.simple.examples.client.SequentialBatchWriter',
-                           INSTANCE_NAME, 
-                           ZOOKEEPERS, 
-                           ROOT, 
-                           ROOT_PASSWORD, 
-                           table,
-                           min,
-                           count,
-                           valueSize,
-                           memory,
-                           latency,
-                           numThreads,
-                           visibility])
+                        '-i', INSTANCE_NAME,
+                        '-z', ZOOKEEPERS,
+                        '-u', ROOT,
+                        '-p', ROOT_PASSWORD,
+                         '-t', table,
+                         '--start', min,
+                         '--num', count,
+                         '--size', valueSize,
+                         '--batchMemory', memory,
+                         '--batchLatency', latency,
+                         '--batchThreads', numThreads,
+                         '--vis', visibility])
         self.comment("Reading and writing some data")
         self.runExample(['org.apache.accumulo.simple.examples.client.ReadWriteExample',
                            '-i', INSTANCE_NAME, 
                            '-z', ZOOKEEPERS, 
                            '-u', ROOT, 
                            '-p', ROOT_PASSWORD, 
-                           '-s', auths,
+                           '--auths', auths,
                            '-t', table,
-                           '-e', 
-                           '-r', 
-                           '-dbg'])
+                           '--createtable', 
+                           '-c', 
+                           '--debug'])
         self.comment("Deleting some data")
         self.runExample(['org.apache.accumulo.simple.examples.client.ReadWriteExample',
                            '-i', INSTANCE_NAME, 
@@ -314,42 +310,42 @@ class Examples(TestUtilsMixin, unittest.
                            '-s', auths,
                            '-t', table,
                            '-d', 
-                           '-dbg'])
+                           '--debug'])
         self.comment("Writing some random data with the batch writer")
         self.runExample(['org.apache.accumulo.simple.examples.client.RandomBatchWriter',
-                           INSTANCE_NAME, 
-                           ZOOKEEPERS, 
-                           ROOT, 
-                           ROOT_PASSWORD, 
-                           table,
-                           count, 
-                           min, 
-                           max, 
-                           valueSize, 
-                           memory, 
-                           latency, 
-                           numThreads, 
-                           visibility])
+                           '-i', INSTANCE_NAME, 
+                           '-z', ZOOKEEPERS, 
+                           '-u', ROOT, 
+                           '-p', ROOT_PASSWORD, 
+                           '-t', table,
+                           '--num', count, 
+                           '--min', min, 
+                           '--max', max, 
+                           '--size', valueSize, 
+                           '--batchMemory', memory, 
+                           '--batchLatency', latency, 
+                           '--batchThreads', numThreads, 
+                           '--vis', visibility])
         self.comment("Writing some random data with the batch writer")
         self.runExample(['org.apache.accumulo.simple.examples.client.RandomBatchScanner',
-                           INSTANCE_NAME, 
-                           ZOOKEEPERS, 
-                           ROOT, 
-                           ROOT_PASSWORD, 
-                           table,
-                           count, 
-                           min, 
-                           max, 
-                           valueSize, 
-                           numThreads, 
-                           auths]);
+                           '-i', INSTANCE_NAME, 
+                           '-z', ZOOKEEPERS, 
+                           '-u', ROOT, 
+                           '-p', ROOT_PASSWORD, 
+                           '-t', table,
+                           '--num', count, 
+                           '--min', min, 
+                           '--max', max, 
+                           '--size', valueSize, 
+                           '--scanThreads', numThreads, 
+                           '--auths', auths]);
         self.comment("Running an example table operation (Flush)")
         self.runExample(['org.apache.accumulo.simple.examples.client.Flush',
-                           INSTANCE_NAME,
-                           ZOOKEEPERS,
-                           ROOT,
-                           ROOT_PASSWORD,
-                           table])
+                           '-i', INSTANCE_NAME, 
+                           '-z', ZOOKEEPERS, 
+                           '-u', ROOT, 
+                           '-p', ROOT_PASSWORD, 
+                           '-t', table])
         self.shutdown_accumulo();
 
 

Modified: accumulo/trunk/test/system/auto/simple/gc.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/gc.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/gc.py (original)
+++ accumulo/trunk/test/system/auto/simple/gc.py Wed Dec 19 16:25:03 2012
@@ -74,7 +74,7 @@ class GCTest(SunnyDayTest):
                             glob.glob(os.path.join(ACCUMULO_HOME,'logs',ID,'gc_*')))
         out, err = handle.communicate()
         self.assert_(handle.returncode != 0)
-        self.pkill(self.masterHost(), 'java.*Main gc$', signal.SIGHUP)
+        self.pkill(self.masterHost(), 'app=gc', signal.SIGHUP)
         self.wait(gc)
         log.info("Verifying Ingestion")
         self.waitForStop(self.verify(self.masterHost(), self.options.rows),
@@ -94,8 +94,9 @@ class GCLotsOfCandidatesTest(TestUtilsMi
         self.stop_gc(self.masterHost())
         log.info("Filling !METADATA table with bogus delete flags")
         prep = self.runOn(self.masterHost(),
-                        [self.accumulo_sh(), 'org.apache.accumulo.server.test.GCLotsOfCandidatesTest',
-                         INSTANCE_NAME,ZOOKEEPERS,ROOT,ROOT_PASSWORD])
+                        [self.accumulo_sh(), 
+                         'org.apache.accumulo.server.test.GCLotsOfCandidatesTest',
+                         '-i',INSTANCE_NAME,'-z', ZOOKEEPERS,'-u', ROOT, '-p', ROOT_PASSWORD])
         out, err = prep.communicate()
         self.assert_(prep.returncode == 0)
 
@@ -103,7 +104,7 @@ class GCLotsOfCandidatesTest(TestUtilsMi
         gc = self.runOn('localhost',
                         ['bash', '-c', 'ACCUMULO_GC_OPTS="-Xmx7m " ' + self.accumulo_sh() + ' gc'])
         self.sleep(20)
-        self.pkill('localhost', 'java.*Main gc$', signal.SIGHUP)
+        self.pkill('localhost', 'app=gc', signal.SIGHUP)
         self.wait(gc)
 
         log.info("Verifying GC ran out of memory and cycled instead of giving up")

Modified: accumulo/trunk/test/system/auto/simple/mapreduce.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/mapreduce.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/mapreduce.py (original)
+++ accumulo/trunk/test/system/auto/simple/mapreduce.py Wed Dec 19 16:25:03 2012
@@ -48,8 +48,7 @@ class MapReduceTest(TestUtilsMixin,unitt
     """
     order = 21
 
-    input_tablename = "mapredf"
-    output_tablename = "mapredf"
+    tablename = "mapredf"
     input_cfcq = "cf-HASHTYPE:cq-NOTHASHED"
     output_cfcq = "cf-HASHTYPE:cq-MD5BASE64"
     example_class_to_run ="org.apache.accumulo.examples.simple.mapreduce.RowHash"
@@ -70,21 +69,21 @@ class MapReduceTest(TestUtilsMixin,unitt
         core = globa(os.path.join('lib','accumulo-core*[!javadoc|sources].jar'))
         fate = globa(os.path.join('lib','accumulo-fate*[!javadoc|sources].jar'))
         start = globa(os.path.join('lib','accumulo-start*[!javadoc|sources].jar'))
+        jcommander = globa(os.path.join('lib','jcommander*[!javadoc|sources].jar'))
         trace = globa(os.path.join('lib','cloudtrace*[!javadoc|sources].jar'))
         zkjar = globbase(os.getenv("ZOOKEEPER_HOME"),"zookeeper*[!javadoc|src|bin].jar")
         self.createInputTableInAccumulo();
         #Arguments for the Example Class
-        arg_list = [TestUtils.INSTANCE_NAME,
-                    TestUtils.ZOOKEEPERS,
-                    TestUtils.ROOT,
-                    TestUtils.ROOT_PASSWORD,
-                    self.input_tablename,
-                    self.input_cfcq,
-                    self.output_tablename]
+        arg_list = ['-i', TestUtils.INSTANCE_NAME,
+                    '-z', TestUtils.ZOOKEEPERS,
+                    '-u', TestUtils.ROOT,
+                    '-p', TestUtils.ROOT_PASSWORD,
+                    '-t', self.tablename,
+                    '--column', self.input_cfcq]
         #MapReduce class to run
         mapred_class= [self.accumulo_sh(),self.example_class_to_run]
         #classes needed to run the mapreduce
-        libjars = ["-libjars",",".join([zkjar,thriftjar,examples,core,fate,trace])]
+        libjars = ["-libjars",",".join([zkjar,thriftjar,examples,core,fate,trace,jcommander])]
         cmd = mapred_class+libjars+arg_list
         if(self.isAccumuloRunning()):
             log.debug("COMMAND:"+str(cmd))
@@ -118,22 +117,22 @@ class MapReduceTest(TestUtilsMixin,unitt
     
     def checkResults(self):
         control_values = [base64.b64encode(hashlib.md5("row%s"%(i)).digest()) for i in range(10)]
-        experiment_values = self.retrieveValues(self.output_tablename, self.output_cfcq)
+        experiment_values = self.retrieveValues(self.tablename, self.output_cfcq)
         self.failIf(len(control_values) != len(experiment_values), "List aren't the same length")
         diff=[ev for ev in experiment_values if ev not in control_values]
         self.failIf(len(diff)>0, "Start and MapReduced Values aren't not the same")
     
     def fakeMRResults(self):
-        vals = self.retrieveValues(self.input_tablename, self.input_cfcq)
+        vals = self.retrieveValues(self.tablename, self.input_cfcq)
         values = ["insert %s %s %s\n" % (i,self.output_cfcq.replace(":"," "),base64.b64encode(hashlib.md5("row%s" % i).digest())) for i in range(10,20)]
-        input = "table %s\n" % (self.input_tablename,)+"".join(values)
+        input = "table %s\n" % (self.tablename,)+"".join(values)
         out,err,code = self.rootShell(self.masterHost(),input)
         #print "FAKE",out
     
     def createInputTableInAccumulo(self):
         #my leet python list comprehensions skills in action
         values = ["insert %s %s row%s\n" % (i,self.input_cfcq.replace(":"," "),i) for i in range(10)]
-        input = "createtable %s\ntable %s\n" % (self.input_tablename,self.input_tablename) + \
+        input = "createtable %s\ntable %s\n" % (self.tablename,self.tablename) + \
                 "".join(values)
         out,err,code = self.rootShell(self.masterHost(),input)
         #print "CREATE",out

Modified: accumulo/trunk/test/system/auto/simple/merge.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/merge.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/merge.py (original)
+++ accumulo/trunk/test/system/auto/simple/merge.py Wed Dec 19 16:25:03 2012
@@ -96,6 +96,7 @@ class MergeTest(JavaTest):
 
     order = 92
     testClass="org.apache.accumulo.server.test.functional.MergeTest"
+    maxRuntime = 200
 
 
 def suite():

Modified: accumulo/trunk/test/system/auto/simple/readwrite.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/readwrite.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/readwrite.py (original)
+++ accumulo/trunk/test/system/auto/simple/readwrite.py Wed Dec 19 16:25:03 2012
@@ -20,7 +20,7 @@ import unittest
 import time
 import sys
 
-from TestUtils import TestUtilsMixin, FUZZ, ACCUMULO_HOME, SITE
+from TestUtils import TestUtilsMixin, FUZZ, ACCUMULO_HOME, SITE, INSTANCE_NAME
 
 log = logging.getLogger('test.auto')
 
@@ -82,12 +82,12 @@ class MultiTableTest(SunnyDayTest):
     
     def ingest(self, host, count, *args, **kwargs):
         klass = 'org.apache.accumulo.server.test.TestMultiTableIngest'
-        args = '-count %d ' % count
+        args = '--count %d -u root -i %s ' % (count, INSTANCE_NAME)
         return self.runClassOn(host, klass, args.split())
 
     def verify(self, host, count, *args, **kwargs):
         klass = 'org.apache.accumulo.server.test.TestMultiTableIngest'
-        args = '-count %d -readonly ' % count
+        args = '--count %d --readonly -u root -i %s ' % (count, INSTANCE_NAME)
         return self.runClassOn(host, klass, args.split())
 
 

Modified: accumulo/trunk/test/system/auto/simple/split.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/split.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/split.py (original)
+++ accumulo/trunk/test/system/auto/simple/split.py Wed Dec 19 16:25:03 2012
@@ -75,8 +75,8 @@ class TabletShouldSplit(SunnyDayTest):
 
         h = self.runOn(self.masterHost(), [self.accumulo_sh(),
                                            'org.apache.accumulo.server.util.CheckForMetadataProblems',
-                                           'root',
-                                           'secret'])
+                                           '-u', 'root',
+                                           '-p', 'secret'])
         out, err = h.communicate()
         self.assert_(h.returncode == 0)
         

Modified: accumulo/trunk/test/system/auto/simple/zoo.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/zoo.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/zoo.py (original)
+++ accumulo/trunk/test/system/auto/simple/zoo.py Wed Dec 19 16:25:03 2012
@@ -28,7 +28,7 @@ class SessionExpired(SunnyDayTest):
 
     def signal(self, which):
         for host in self.hosts:
-            self.pkill(host, ' tserver$', which)
+            self.pkill(host, '=tserver', which)
 
     def runTest(self):
         # stop the tservers from talking to zookeeeper

Modified: accumulo/trunk/test/system/auto/simple/zooCacheTest.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/zooCacheTest.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/zooCacheTest.py (original)
+++ accumulo/trunk/test/system/auto/simple/zooCacheTest.py Wed Dec 19 16:25:03 2012
@@ -36,7 +36,7 @@ class ZooCacheTest(TestUtilsMixin, unitt
         handleR2 = self.runClassOn('localhost', 'org.apache.accumulo.server.test.functional.CacheTestReader', ['/zcTest-42','/tmp/zcTest-42', ZOOKEEPERS])
         handleR3 = self.runClassOn('localhost', 'org.apache.accumulo.server.test.functional.CacheTestReader', ['/zcTest-42','/tmp/zcTest-42', ZOOKEEPERS])
         handleW = self.runClassOn('localhost', 'org.apache.accumulo.server.test.functional.CacheTestWriter', ['/zcTest-42','/tmp/zcTest-42','3','500'])
-        self.waitForStop(handleW, 90)
+        self.waitForStop(handleW, 200)
         self.waitForStop(handleR1, 1)
         self.waitForStop(handleR2, 1)
         self.waitForStop(handleR3, 1)

Modified: accumulo/trunk/test/system/auto/stress/batchWrite.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/stress/batchWrite.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/stress/batchWrite.py (original)
+++ accumulo/trunk/test/system/auto/stress/batchWrite.py Wed Dec 19 16:25:03 2012
@@ -33,7 +33,7 @@ class WriteLots(unittest.TestCase, TestU
 
     def ingest(self, host, start, count, **kwargs):
         klass = 'org.apache.accumulo.server.test.TestIngest'
-        args = '-tsbw -size 50 -random 56 %d %d 1' % (count, start)
+        args = '--user root --size 50 --random 56 --rows %d --start %d --cols 1' % (count, start)
         return self.runClassOn(host, klass, args.split(), **kwargs)
 
     def setUp(self):

Modified: accumulo/trunk/test/system/auto/stress/halfDead.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/stress/halfDead.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/stress/halfDead.py (original)
+++ accumulo/trunk/test/system/auto/stress/halfDead.py Wed Dec 19 16:25:03 2012
@@ -40,8 +40,7 @@ class TabletServerHangs(SunnyDayTest):
          os.environ['LD_PRELOAD'] = libpath
          os.environ['DYLD_INSERT_LIBRARIES'] = libpath
          os.environ['DYLD_FORCE_FLAT_NAMESPACE'] = 'true'
-         self.stop = self.runOn(self.masterHost(),
-                                [self.accumulo_sh(), 'tserver'])
+         self.stop = self.runOn(self.masterHost(), [self.accumulo_sh(), 'tserver'])
          del os.environ['LD_PRELOAD']
          del os.environ['DYLD_FORCE_FLAT_NAMESPACE']
          del os.environ['DYLD_INSERT_LIBRARIES']
@@ -60,8 +59,10 @@ class TabletServerHangs(SunnyDayTest):
                                      MANY_ROWS,
                                      size=self.options.size)
          # wait for the ingester to get going
-         self.ingester.stdout.readline()
-         self.ingester.stdout.readline()
+         for i in range(100):
+	     line = self.ingester.stdout.readline()
+	     if line == '' or line.find(' sent ') > 0:
+                break
 
          log.info("Starting faking disk failure for tserver")
          fp = open(self.flagFile, "w+")

Modified: accumulo/trunk/test/system/bench/lib/IngestBenchmark.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/IngestBenchmark.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/lib/IngestBenchmark.py (original)
+++ accumulo/trunk/test/system/bench/lib/IngestBenchmark.py Wed Dec 19 16:25:03 2012
@@ -60,12 +60,12 @@ class IngestBenchmark(Benchmark):
             commands[s] = '%s %s -username %s -password %s -size %d -random %d %d %d %d' % (
                 accumulo('bin', 'accumulo'),
                 'org.apache.accumulo.server.test.TestIngest',
-                self.username, self.password,
-                self.size(),
-                self.random(),
-                self.count(),
-                i*self.count(),
-                1)
+                '-u', self.username, '-p', self.password,
+                '--size', self.size(),
+                '--random', self.random(),
+                '--rows', self.count(),
+                '--start', i*self.count(),
+                '--cols', 1)
         results = runEach(commands)
         codes = {}
         for slave, (code, out, err) in results.items():

Modified: accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py (original)
+++ accumulo/trunk/test/system/bench/lib/RowHashBenchmark.py Wed Dec 19 16:25:03 2012
@@ -58,17 +58,17 @@ class RowHashBenchmark(Benchmark):
             self.sleep(15)
         code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.output_table, file))
         command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
-                                    self.numrows(),
-                                    self.keysizemin(),
-                                    self.keysizemax(),
-                                    self.minvaluesize(),
-                                    self.maxvaluesize(),
-                                    self.input_table, 
-                                    self.getInstance(),
-                                    self.getZookeepers(),
-                                    self.getUsername(),
-                                    self.getPassword(),
-                                    self.maxmaps)
+                                    '--count', self.numrows(),
+                                    '-nk', self.keysizemin(),
+                                    '-xk', self.keysizemax(),
+                                    '-nv', self.minvaluesize(),
+                                    '-xv', self.maxvaluesize(),
+                                    '-t', self.input_table, 
+                                    '-i', self.getInstance(),
+                                    '-z', self.getZookeepers(),
+                                    '-u', self.getUsername(),
+                                    '-p', self.getPassword(),
+                                    --splits', self.maxmaps)
         handle = runner.start(command, stdin=subprocess.PIPE)
         log.debug("Running: %r", command)
         out, err = handle.communicate("")  

Modified: accumulo/trunk/test/system/continuous/report.pl
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/report.pl?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/report.pl (original)
+++ accumulo/trunk/test/system/continuous/report.pl Wed Dec 19 16:25:03 2012
@@ -88,7 +88,7 @@ sub plot {
 	my $output = shift(@_);
 	my $title = shift(@_);
 
-	system("$cmd | $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.TimeBinner $period $time_col $data_col $op MM/dd/yy-HH:mm:ss > $REPORT_DIR/$output.dat");
+	system("$cmd | $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.TimeBinner --period $period --timeColumn $time_col --dataColumn $data_col --operation $op --dateFormat MM/dd/yy-HH:mm:ss > $REPORT_DIR/$output.dat");
 	gnuplot("$REPORT_DIR/$output.dat", "$REPORT_DIR/$output.png", $op eq "AMM" || $op eq "AMM_HACK1");
 
 	print HTML "<P><h2>$title</h2><img src='$output.png'>\n";

Modified: accumulo/trunk/test/system/continuous/run-moru.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/run-moru.sh?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/run-moru.sh (original)
+++ accumulo/trunk/test/system/continuous/run-moru.sh Wed Dec 19 16:25:03 2012
@@ -18,5 +18,5 @@
 
 . mapred-setup.sh
 
-$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.server.test.continuous.ContinuousMoru -libjars "$SERVER_LIBJAR" $INSTANCE_NAME $ZOO_KEEPERS $USER $PASS $TABLE $MIN $MAX $MAX_CF $MAX_CQ $MAX_MEM $MAX_LATENCY $NUM_THREADS $VERIFY_MAX_MAPS
+$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.server.test.continuous.ContinuousMoru -libjars "$SERVER_LIBJAR" -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS -t $TABLE --min $MIN --max $MAX --maxColF $MAX_CF --maxColQ $MAX_CQ --batchMemory $MAX_MEM --batchLatency $MAX_LATENCY --batchThreads $NUM_THREADS --maxMappers $VERIFY_MAX_MAPS
 

Modified: accumulo/trunk/test/system/continuous/run-verify.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/run-verify.sh?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/run-verify.sh (original)
+++ accumulo/trunk/test/system/continuous/run-verify.sh Wed Dec 19 16:25:03 2012
@@ -23,6 +23,10 @@ AUTH_OPT="";
 if [ -n "$VERIFY_AUTHS" ] ; then
 	AUTH_OPT="--auths $VERIFY_AUTHS";
 fi
+SCAN_OPT=--offline
+if [ "$SCAN_OFFLINE" == "false" ] then
+       SCAN_OPT=
+fi
 
-$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.server.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" $AUTH_OPT $INSTANCE_NAME $ZOO_KEEPERS $USER $PASS $TABLE $VERFIY_OUT $VERIFY_MAX_MAPS $VERIFY_REDUCERS $SCAN_OFFLINE
+$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.server.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS -t $TABLE --output $VERFIY_OUT --maxMappers $VERIFY_MAX_MAPS --reduces $VERIFY_REDUCERS $SCAN_OPT
 

Modified: accumulo/trunk/test/system/continuous/start-batchwalkers.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/start-batchwalkers.sh?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/start-batchwalkers.sh (original)
+++ accumulo/trunk/test/system/continuous/start-batchwalkers.sh Wed Dec 19 16:25:03 2012
@@ -30,5 +30,5 @@ if [ -n "$AUTHS" ] ; then
 fi
 
 
-pssh -h batch_walkers.txt "mkdir -p $CONTINUOUS_LOG_DIR; nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousBatchWalker $DEBUG_OPT $AUTH_OPT $INSTANCE_NAME $ZOO_KEEPERS $USER $PASS $TABLE $MIN $MAX $BATCH_WALKER_SLEEP $BATCH_WALKER_BATCH_SIZE $BATCH_WALKER_THREADS >$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_batch_walk.out 2>$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_batch_walk.err &" < /dev/null
+pssh -h batch_walkers.txt "mkdir -p $CONTINUOUS_LOG_DIR; nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousBatchWalker $DEBUG_OPT $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS -t $TABLE --min $MIN --max $MAX --sleep $BATCH_WALKER_SLEEP --numToScan $BATCH_WALKER_BATCH_SIZE --batchThreads $BATCH_WALKER_THREADS >$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_batch_walk.out 2>$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_batch_walk.err &" < /dev/null
 

Modified: accumulo/trunk/test/system/continuous/start-ingest.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/start-ingest.sh?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/start-ingest.sh (original)
+++ accumulo/trunk/test/system/continuous/start-ingest.sh Wed Dec 19 16:25:03 2012
@@ -28,6 +28,10 @@ fi
 if [ -n "$VISIBILITIES" ] ; then
 	VIS_OPT="--visibilities \"$VISIBILITIES\"";
 fi
+CHECKSUM_OPT=--addCheckSum
+if [ "$CHECKSUM" == "false" ] ; then
+        CHECSUM_OPT=
+fi
 
-pssh -h ingesters.txt "mkdir -p $CONTINUOUS_LOG_DIR; nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousIngest $DEBUG_OPT $VIS_OPT $INSTANCE_NAME $ZOO_KEEPERS $USER $PASS $TABLE $NUM $MIN $MAX $MAX_CF $MAX_CQ $MAX_MEM $MAX_LATENCY $NUM_THREADS $CHECKSUM >$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_ingest.out 2>$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_ingest.err &" < /dev/null
+pssh -h ingesters.txt "mkdir -p $CONTINUOUS_LOG_DIR; nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousIngest $DEBUG_OPT $VIS_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS -t $TABLE --num $NUM --min $MIN --max $MAX --minColF $MAX_CF --minColQ $MAX_CQ --batchMemory $MAX_MEM --batchLatency $MAX_LATENCY --batchThreads $NUM_THREADS $CHECKSUM_OPT >$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_ingest.out 2>$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_ingest.err &" < /dev/null
 

Modified: accumulo/trunk/test/system/continuous/start-scanners.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/start-scanners.sh?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/start-scanners.sh (original)
+++ accumulo/trunk/test/system/continuous/start-scanners.sh Wed Dec 19 16:25:03 2012
@@ -30,5 +30,5 @@ if [ -n "$AUTHS" ] ; then
 fi
 
 
-pssh -h scanners.txt "mkdir -p $CONTINUOUS_LOG_DIR; nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousScanner $DEBUG_OPT $AUTH_OPT $INSTANCE_NAME $ZOO_KEEPERS $USER $PASS $TABLE $MIN $MAX $SCANNER_SLEEP_TIME $SCANNER_ENTRIES >$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_scanner.out 2>$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_scanner.err &" < /dev/null
+pssh -h scanners.txt "mkdir -p $CONTINUOUS_LOG_DIR; nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousScanner $DEBUG_OPT $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS -t $TABLE --min $MIN --max $MAX --sleep $SCANNER_SLEEP_TIME --numToScan $SCANNER_ENTRIES >$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_scanner.out 2>$CONTINUOUS_LOG_DIR/\`date +%Y%m%d%H%M%S\`_\`hostname\`_scanner.err &" < /dev/null
 

Modified: accumulo/trunk/test/system/continuous/start-stats.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/continuous/start-stats.sh?rev=1423923&r1=1423922&r2=1423923&view=diff
==============================================================================
--- accumulo/trunk/test/system/continuous/start-stats.sh (original)
+++ accumulo/trunk/test/system/continuous/start-stats.sh Wed Dec 19 16:25:03 2012
@@ -34,5 +34,5 @@ echo "`wc -l scanners.txt`" >> $CONFIG_O
 echo "`wc -l batch_walkers.txt`" >> $CONFIG_OUT
 
 
-nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousStatsCollector $TABLE $INSTANCE_NAME $ZOO_KEEPERS $USER $PASS >$CONTINUOUS_LOG_DIR/`date +%Y%m%d%H%M%S`_`hostname`_stats.out 2>$CONTINUOUS_LOG_DIR/`date +%Y%m%d%H%M%S`_`hostname`_stats.err &
+nohup $ACCUMULO_HOME/bin/accumulo org.apache.accumulo.server.test.continuous.ContinuousStatsCollector -t $TABLE -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS >$CONTINUOUS_LOG_DIR/`date +%Y%m%d%H%M%S`_`hostname`_stats.out 2>$CONTINUOUS_LOG_DIR/`date +%Y%m%d%H%M%S`_`hostname`_stats.err &
 



Mime
View raw message