accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1391754 [10/11] - in /accumulo/branches/ACCUMULO-259: ./ assemble/ conf/ conf/examples/1GB/native-standalone/ conf/examples/1GB/standalone/ conf/examples/2GB/native-standalone/ conf/examples/2GB/standalone/ conf/examples/3GB/native-standal...
Date Sat, 29 Sep 2012 05:43:13 GMT
Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/FunctionalTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/FunctionalTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/FunctionalTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/FunctionalTest.java Sat Sep 29 05:42:59 2012
@@ -41,15 +41,14 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.start.classloader.AccumuloClassLoader;
 import org.apache.commons.cli.BasicParser;
 import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.Parser;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
@@ -227,7 +226,7 @@ public abstract class FunctionalTest {
     String tableId = Tables.getNameToIdMap(getInstance()).get(tableName);
     scanner.setRange(new Range(new Text(tableId + ";"), true, new Text(tableId + "<"), true));
     scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
-    ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
+    Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
     
     HashMap<Text,Integer> tabletFileCounts = new HashMap<Text,Integer>();
     
@@ -272,14 +271,11 @@ public abstract class FunctionalTest {
   }
   
   public static void main(String[] args) throws Exception {
-    Parser p = new BasicParser();
-    
     CommandLine cl = null;
     try {
-      cl = p.parse(opts, args);
+      cl = new BasicParser().parse(opts, args);
     } catch (ParseException e) {
-      System.out.println("Parse Exception, exiting.");
-      return;
+      printHelpAndExit(e.toString());
     }
     
     String master = cl.getOptionValue(masterOpt.getOpt(), "localhost");
@@ -288,6 +284,9 @@ public abstract class FunctionalTest {
     String instanceName = cl.getOptionValue(instanceNameOpt.getOpt(), "FuncTest");
     
     String remainingArgs[] = cl.getArgs();
+    if (remainingArgs.length < 2) {
+      printHelpAndExit("Missing java classname to test and/or options.");
+    }
     String clazz = remainingArgs[0];
     String opt = remainingArgs[1];
     
@@ -312,9 +311,18 @@ public abstract class FunctionalTest {
       fTest.run();
     } else if (opt.equals("cleanup")) {
       fTest.cleanup();
+    } else {
+    	printHelpAndExit("Unknown option: " + opt);
     }
     
   }
+
+  static void printHelpAndExit(String message) {
+      System.out.println(message);
+      HelpFormatter formatter = new HelpFormatter();
+      formatter.printHelp( "FunctionalTest {options} java_class [getconfig|setup|run|cleanup]", opts );
+      System.exit(1);
+  }
   
   static Mutation nm(String row, String cf, String cq, Value value) {
     Mutation m = new Mutation(new Text(row));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java Sat Sep 29 05:42:59 2012
@@ -19,12 +19,13 @@ package org.apache.accumulo.server.test.
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Random;
 import java.util.TreeSet;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -105,7 +106,7 @@ public class LargeRowTest extends Functi
   }
   
   private void basicTest(String table, int expectedSplits) throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter(table, 10000000l, 60l, 3);
+    BatchWriter bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
     
     Random r = new Random();
     byte rowData[] = new byte[ROW_SIZE];

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java Sat Sep 29 05:42:59 2012
@@ -23,6 +23,7 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.admin.TimeType;
@@ -79,7 +80,7 @@ public class LogicalTimeTest extends Fun
     }
     conn.tableOperations().addSplits(table, splitSet);
     
-    BatchWriter bw = conn.createBatchWriter(table, 1000000, 60000l, 1);
+    BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig());
     for (String row : inserts) {
       Mutation m = new Mutation(row);
       m.put("cf", "cq", "v");

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MaxOpenTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MaxOpenTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MaxOpenTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MaxOpenTest.java Sat Sep 29 05:42:59 2012
@@ -80,8 +80,8 @@ public class MaxOpenTest extends Functio
     time1 = batchScan(ranges, 1);
     long time2 = batchScan(ranges, NUM_TABLETS);
     
-    System.out.printf("Single thread scan time   %6.2f \n", time1 / 1000.0);
-    System.out.printf("Multiple thread scan time %6.2f \n", time2 / 1000.0);
+    System.out.printf("Single thread scan time   %6.2f %n", time1 / 1000.0);
+    System.out.printf("Multiple thread scan time %6.2f %n", time2 / 1000.0);
     
   }
   

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java Sat Sep 29 05:42:59 2012
@@ -26,6 +26,7 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.admin.TimeType;
@@ -98,7 +99,7 @@ public class MergeTest extends Functiona
     }
     conn.tableOperations().addSplits(table, splitSet);
     
-    BatchWriter bw = conn.createBatchWriter(table, 1000000, 60000l, 1);
+    BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig());
     HashSet<String> expected = new HashSet<String>();
     for (String row : inserts) {
       Mutation m = new Mutation(row);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java Sat Sep 29 05:42:59 2012
@@ -30,6 +30,7 @@ import org.apache.accumulo.core.Constant
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.MutationsRejectedException;
@@ -356,7 +357,7 @@ public class PermissionsTest {
         // create the test table
         getConnector().tableOperations().create(TEST_TABLE);
         // put in some initial data
-        BatchWriter writer = getConnector().createBatchWriter(TEST_TABLE, 10 * 1024l, 1000l, 1);
+        BatchWriter writer = getConnector().createBatchWriter(TEST_TABLE, new BatchWriterConfig());
         Mutation m = new Mutation(new Text("row"));
         m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes()));
         writer.addMutation(m);
@@ -394,7 +395,7 @@ public class PermissionsTest {
           break;
         case WRITE:
           try {
-            writer = test_user_conn.createBatchWriter(TEST_TABLE, 10 * 1024l, 1000l, 1);
+            writer = test_user_conn.createBatchWriter(TEST_TABLE, new BatchWriterConfig());
             m = new Mutation(new Text("row"));
             m.put(new Text("a"), new Text("b"), new Value("c".getBytes()));
             writer.addMutation(m);
@@ -463,7 +464,7 @@ public class PermissionsTest {
             iter.next();
           break;
         case WRITE:
-          writer = test_user_conn.createBatchWriter(TEST_TABLE, 10 * 1024l, 1000l, 1);
+          writer = test_user_conn.createBatchWriter(TEST_TABLE, new BatchWriterConfig());
           m = new Mutation(new Text("row"));
           m.put(new Text("a"), new Text("b"), new Value("c".getBytes()));
           writer.addMutation(m);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java Sat Sep 29 05:42:59 2012
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -54,7 +55,7 @@ public class RowDeleteTest extends Funct
   
   @Override
   public void run() throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter("rdel1", 1000000, 60000l, 1);
+    BatchWriter bw = getConnector().createBatchWriter("rdel1", new BatchWriterConfig());
     
     bw.addMutation(nm("r1", "foo", "cf1", "v1"));
     bw.addMutation(nm("r1", "bar", "cf1", "v2"));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java Sat Sep 29 05:42:59 2012
@@ -25,6 +25,7 @@ import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.ScannerBase;
@@ -53,7 +54,7 @@ public class ScanIteratorTest extends Fu
   @Override
   public void run() throws Exception {
     
-    BatchWriter bw = getConnector().createBatchWriter("foo", 100000, 60000l, 4);
+    BatchWriter bw = getConnector().createBatchWriter("foo", new BatchWriterConfig());
     
     for (int i = 0; i < 1000; i++) {
       Mutation m = new Mutation(new Text(String.format("%06d", i)));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java Sat Sep 29 05:42:59 2012
@@ -20,11 +20,12 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import java.util.TreeSet;
 import java.util.Map.Entry;
+import java.util.TreeSet;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -228,7 +229,7 @@ public class ScanRangeTest extends Funct
   
   private void insertData(String table) throws Exception {
     
-    BatchWriter bw = getConnector().createBatchWriter(table, 10000000l, 1000l, 4);
+    BatchWriter bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
     
     for (int i = 0; i < ROW_LIMIT; i++) {
       Mutation m = new Mutation(createRow(i));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java Sat Sep 29 05:42:59 2012
@@ -24,6 +24,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -53,7 +54,7 @@ public class ScanSessionTimeOutTest exte
   
   @Override
   public void run() throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter("abc", 1000000, 60000l, 1);
+    BatchWriter bw = getConnector().createBatchWriter("abc", new BatchWriterConfig());
     
     for (int i = 0; i < 100000; i++) {
       Mutation m = new Mutation(new Text(String.format("%08d", i)));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java Sat Sep 29 05:42:59 2012
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.admin.TableOperations;
@@ -61,7 +62,7 @@ public class ServerSideErrorTest extends
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("acf")));
     getConnector().tableOperations().attachIterator("tt", is);
     
-    BatchWriter bw = getConnector().createBatchWriter("tt", 1000000, 60000l, 2);
+    BatchWriter bw = getConnector().createBatchWriter("tt", new BatchWriterConfig());
     
     Mutation m = new Mutation(new Text("r1"));
     m.put(new Text("acf"), new Text("foo"), new Value("1".getBytes()));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java Sat Sep 29 05:42:59 2012
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -50,7 +51,7 @@ public class SparseColumnFamilyTest exte
   public void run() throws Exception {
     getConnector().tableOperations().create("scftt");
     
-    BatchWriter bw = getConnector().createBatchWriter("scftt", 10000000, 60000l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("scftt", new BatchWriterConfig());
     
     // create file in the tablet that has mostly column family 0, with a few entries for column family 1
 

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java Sat Sep 29 05:42:59 2012
@@ -24,13 +24,14 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -94,7 +95,7 @@ public class VisibilityTest extends Func
   
   private void insertData() throws Exception {
     
-    BatchWriter bw = getConnector().createBatchWriter("vt", 1000000l, 60l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("vt", new BatchWriterConfig());
     Mutation m1 = new Mutation(new Text("row1"));
     
     mput(m1, "cf1", "cq1", "", "v1");
@@ -117,7 +118,7 @@ public class VisibilityTest extends Func
   
   private void deleteData() throws Exception {
     
-    BatchWriter bw = getConnector().createBatchWriter("vt", 1000000l, 60l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("vt", new BatchWriterConfig());
     Mutation m1 = new Mutation(new Text("row1"));
     
     mputDelete(m1, "cf1", "cq1", "");
@@ -148,7 +149,7 @@ public class VisibilityTest extends Func
   }
   
   private void insertDefaultData() throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter("vt2", 1000000l, 60l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("vt2", new BatchWriterConfig());
     Mutation m1 = new Mutation(new Text("row1"));
     
     mput(m1, "cf1", "cq1", "BASE", "v1");

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ZombieTServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ZombieTServer.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ZombieTServer.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ZombieTServer.java Sat Sep 29 05:42:59 2012
@@ -29,7 +29,6 @@ import org.apache.accumulo.core.master.t
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
-import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor;
 import org.apache.accumulo.core.util.AddressUtil;

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java Sat Sep 29 05:42:59 2012
@@ -27,6 +27,7 @@ import java.util.UUID;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
@@ -36,7 +37,6 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.util.AddressUtil;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.Stat;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.security.SecurityConstants;
@@ -82,7 +82,7 @@ public class MetadataBatchScanTest {
     
     if (args[0].equals("write")) {
       
-      BatchWriter bw = connector.createBatchWriter(Constants.METADATA_TABLE_NAME, 10000000, 60000l, 3);
+      BatchWriter bw = connector.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
       
       for (KeyExtent extent : extents) {
         Mutation mut = extent.getPrevRowUpdateMutation();
@@ -100,7 +100,7 @@ public class MetadataBatchScanTest {
         
         String dir = "/t-" + UUID.randomUUID();
         
-        ColumnFQ.put(mut, Constants.METADATA_DIRECTORY_COLUMN, new Value(dir.getBytes()));
+        Constants.METADATA_DIRECTORY_COLUMN.put(mut, new Value(dir.getBytes()));
         
         for (int i = 0; i < 5; i++) {
           mut.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(dir + "/00000_0000" + i + ".map"), new Value("10000,1000000".getBytes()));
@@ -154,7 +154,7 @@ public class MetadataBatchScanTest {
       
       long t2 = System.currentTimeMillis();
       
-      System.out.printf("tt : %6.2f\n", (t2 - t1) / 1000.0);
+      System.out.printf("tt : %6.2f%n", (t2 - t1) / 1000.0);
       
     } else {
       throw new IllegalArgumentException();
@@ -170,7 +170,7 @@ public class MetadataBatchScanTest {
     
     BatchScanner bs = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS, 1);
     bs.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
-    ColumnFQ.fetch(bs, Constants.METADATA_PREV_ROW_COLUMN);
+    Constants.METADATA_PREV_ROW_COLUMN.fetch(bs);
     
     bs.setRanges(ranges);
     

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/scan/CollectTabletStats.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/scan/CollectTabletStats.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/scan/CollectTabletStats.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/performance/scan/CollectTabletStats.java Sat Sep 29 05:42:59 2012
@@ -154,7 +154,7 @@ public class CollectTabletStats {
       reportHdfsBlockLocations(tabletFiles.get(ke));
     }
     
-    System.out.println("\n*** RUNNING TEST ***\n");
+    System.out.println("%n*** RUNNING TEST ***%n");
     
     ExecutorService threadPool = Executors.newFixedThreadPool(numThreads);
     
@@ -288,7 +288,7 @@ public class CollectTabletStats {
       double time = (t2 - t1) / 1000.0;
       
       System.out.printf("\t\ttablet: " + ke.getUUID() + "  thread: " + Thread.currentThread().getId()
-          + " count: %,d cells  time: %6.2f  rate: %,6.2f cells/sec\n", count, time, count / time);
+          + " count: %,d cells  time: %6.2f  rate: %,6.2f cells/sec%n", count, time, count / time);
       
       finishCdl.countDown();
     }
@@ -334,7 +334,7 @@ public class CollectTabletStats {
     }
     
     double time = (maxTime - minTime) / 1000.0;
-    System.out.printf("\tAggregate stats  count: %,d cells  time: %6.2f  rate: %,6.2f cells/sec\n", count, time, count / time);
+    System.out.printf("\tAggregate stats  count: %,d cells  time: %6.2f  rate: %,6.2f cells/sec%n", count, time, count / time);
     System.out.println();
     
     // run the gc between test so that object created during previous test are not
@@ -590,7 +590,7 @@ public class CollectTabletStats {
   }
   
   private static void printStat(String desc, Stat s) {
-    System.out.printf("\t\tDescription: [%30s]  average: %,6.2f  std dev: %,6.2f  min: %,d  max: %,d \n", desc, s.getAverage(), s.getStdDev(), s.getMin(),
+    System.out.printf("\t\tDescription: [%30s]  average: %,6.2f  std dev: %,6.2f  min: %,d  max: %,d %n", desc, s.getAverage(), s.getStdDev(), s.getMin(),
         s.getMax());
     
   }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java Sat Sep 29 05:42:59 2012
@@ -21,7 +21,9 @@ import java.lang.management.ManagementFa
 import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Properties;
+import java.util.concurrent.TimeUnit;
 
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.MultiTableBatchWriter;
@@ -112,9 +114,10 @@ public class State {
   public MultiTableBatchWriter getMultiTableBatchWriter() {
     if (mtbw == null) {
       long maxMem = Long.parseLong(props.getProperty("MAX_MEM"));
-      int maxLatency = Integer.parseInt(props.getProperty("MAX_LATENCY"));
+      long maxLatency = Long.parseLong(props.getProperty("MAX_LATENCY"));
       int numThreads = Integer.parseInt(props.getProperty("NUM_THREADS"));
-      mtbw = connector.createMultiTableBatchWriter(maxMem, maxLatency, numThreads);
+      mtbw = connector.createMultiTableBatchWriter(new BatchWriterConfig().setMaxMemory(maxMem).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS)
+          .setMaxWriteThreads(numThreads));
     }
     return mtbw;
   }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java Sat Sep 29 05:42:59 2012
@@ -21,6 +21,7 @@ import java.util.Properties;
 import java.util.Random;
 
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableDeletedException;
@@ -45,7 +46,7 @@ public class BatchWrite extends Test {
     String tableName = tableNames.get(rand.nextInt(tableNames.size()));
     
     try {
-      BatchWriter bw = conn.createBatchWriter(tableName, 1000000, 60000l, 3);
+      BatchWriter bw = conn.createBatchWriter(tableName, new BatchWriterConfig());
       try {
         int numRows = rand.nextInt(100000);
         for (int i = 0; i < numRows; i++) {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java Sat Sep 29 05:42:59 2012
@@ -27,6 +27,7 @@ import java.util.UUID;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.Scanner;
@@ -127,7 +128,7 @@ public class TableOp extends Test {
         }
         BatchWriter writer;
         try {
-          writer = conn.createBatchWriter(tableName, 9000l, 0l, 1);
+          writer = conn.createBatchWriter(tableName, new BatchWriterConfig().setMaxMemory(9000l).setMaxWriteThreads(1));
         } catch (TableNotFoundException tnfe) {
           if (tableExists)
             throw new AccumuloException("Table didn't exist when it should have: " + tableName);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java Sat Sep 29 05:42:59 2012
@@ -52,74 +52,78 @@ public class BatchVerify extends Test {
     Connector conn = state.getConnector();
     BatchScanner scanner = conn.createBatchScanner(state.getString("seqTableName"), new Authorizations(), 2);
     
-    int count = 0;
-    List<Range> ranges = new ArrayList<Range>();
-    while (count < numVerify) {
-      int rangeStart = rand.nextInt(numWrites);
-      int rangeEnd = rangeStart + 99;
-      if (rangeEnd > (numWrites - 1)) {
-        rangeEnd = numWrites - 1;
-      }
-      count += (rangeEnd - rangeStart) + 1;
-      ranges.add(new Range(new Text(String.format("%010d", rangeStart)), new Text(String.format("%010d", rangeEnd))));
-    }
-    
-    ranges = Range.mergeOverlapping(ranges);
-    Collections.sort(ranges);
-    
-    if (count == 0 || ranges.size() == 0)
-      return;
-    
-    log.debug(String.format("scanning %d rows in the following %d ranges:", count, ranges.size()));
-    for (Range r : ranges) {
-      log.debug(r);
-    }
-    
-    scanner.setRanges(ranges);
-    
-    List<Key> keys = new ArrayList<Key>();
-    for (Entry<Key,Value> entry : scanner) {
-      keys.add(entry.getKey());
-    }
-    
-    log.debug("scan returned " + keys.size() + " rows. now verifying...");
-    
-    Collections.sort(keys);
-    
-    Iterator<Key> iterator = keys.iterator();
-    int curKey = Integer.parseInt(iterator.next().getRow().toString());
-    boolean done = false;
-    for (Range r : ranges) {
-      int start = Integer.parseInt(r.getStartKey().getRow().toString());
-      int end = Integer.parseInt(String.copyValueOf(r.getEndKey().getRow().toString().toCharArray(), 0, 10));
-      for (int i = start; i <= end; i++) {
-        
-        if (done) {
-          log.error("missing key " + i);
-          break;
+    try {
+      int count = 0;
+      List<Range> ranges = new ArrayList<Range>();
+      while (count < numVerify) {
+        int rangeStart = rand.nextInt(numWrites);
+        int rangeEnd = rangeStart + 99;
+        if (rangeEnd > (numWrites - 1)) {
+          rangeEnd = numWrites - 1;
         }
-        
-        while (curKey < i) {
-          log.error("extra key " + curKey);
-          if (iterator.hasNext() == false) {
-            done = true;
+        count += (rangeEnd - rangeStart) + 1;
+        ranges.add(new Range(new Text(String.format("%010d", rangeStart)), new Text(String.format("%010d", rangeEnd))));
+      }
+      
+      ranges = Range.mergeOverlapping(ranges);
+      Collections.sort(ranges);
+      
+      if (count == 0 || ranges.size() == 0)
+        return;
+      
+      log.debug(String.format("scanning %d rows in the following %d ranges:", count, ranges.size()));
+      for (Range r : ranges) {
+        log.debug(r);
+      }
+      
+      scanner.setRanges(ranges);
+      
+      List<Key> keys = new ArrayList<Key>();
+      for (Entry<Key,Value> entry : scanner) {
+        keys.add(entry.getKey());
+      }
+      
+      log.debug("scan returned " + keys.size() + " rows. now verifying...");
+      
+      Collections.sort(keys);
+      
+      Iterator<Key> iterator = keys.iterator();
+      int curKey = Integer.parseInt(iterator.next().getRow().toString());
+      boolean done = false;
+      for (Range r : ranges) {
+        int start = Integer.parseInt(r.getStartKey().getRow().toString());
+        int end = Integer.parseInt(String.copyValueOf(r.getEndKey().getRow().toString().toCharArray(), 0, 10));
+        for (int i = start; i <= end; i++) {
+          
+          if (done) {
+            log.error("missing key " + i);
             break;
           }
-          curKey = Integer.parseInt(iterator.next().getRow().toString());
-        }
-        
-        if (curKey > i) {
-          log.error("missing key " + i);
-        }
-        
-        if (iterator.hasNext()) {
-          curKey = Integer.parseInt(iterator.next().getRow().toString());
-        } else {
-          done = true;
+          
+          while (curKey < i) {
+            log.error("extra key " + curKey);
+            if (iterator.hasNext() == false) {
+              done = true;
+              break;
+            }
+            curKey = Integer.parseInt(iterator.next().getRow().toString());
+          }
+          
+          if (curKey > i) {
+            log.error("missing key " + i);
+          }
+          
+          if (iterator.hasNext()) {
+            curKey = Integer.parseInt(iterator.next().getRow().toString());
+          } else {
+            done = true;
+          }
         }
       }
+      
+      log.debug("verify is now complete");
+    } finally {
+      scanner.close();
     }
-    
-    log.debug("verify is now complete");
   }
 }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java Sat Sep 29 05:42:59 2012
@@ -22,6 +22,7 @@ import java.util.Random;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -42,7 +43,7 @@ public class Reindex extends Test {
     ShardFixture.createIndexTable(this.log, state, "_tmp", rand);
     
     Scanner scanner = state.getConnector().createScanner(docTableName, Constants.NO_AUTHS);
-    BatchWriter tbw = state.getConnector().createBatchWriter(tmpIndexTableName, 100000000, 60000l, 4);
+    BatchWriter tbw = state.getConnector().createBatchWriter(tmpIndexTableName, new BatchWriterConfig());
     
     int count = 0;
     

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java Sat Sep 29 05:42:59 2012
@@ -51,7 +51,7 @@ public class VerifyIndex extends Test {
       Key key1 = entry.getKey();
       Key key2 = iter.next().getKey();
       
-      if (key1.compareTo(key2, PartialKey.ROW_COLFAM_COLQUAL) != 0)
+      if (!key1.equals(key2, PartialKey.ROW_COLFAM_COLQUAL))
         throw new Exception("index rebuild mismatch " + key1 + " " + key2 + " " + indexTableName + " " + tmpIndexTableName);
       count++;
       if (count % 1000 == 0)

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java Sat Sep 29 05:42:59 2012
@@ -18,8 +18,10 @@ package org.apache.accumulo.server.test.
 
 import java.util.Random;
 import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -71,7 +73,8 @@ public class Ingest extends ScaleTest {
     // create batch writer
     BatchWriter bw = null;
     try {
-      bw = conn.createBatchWriter(tableName, maxMemory, maxLatency, maxWriteThreads);
+      bw = conn.createBatchWriter(tableName, new BatchWriterConfig().setMaxMemory(maxMemory).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS)
+          .setMaxWriteThreads(maxWriteThreads));
     } catch (TableNotFoundException e) {
       System.out.println("Table not found: " + tableName);
       e.printStackTrace();

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/ScaleTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/ScaleTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/ScaleTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/scalability/ScaleTest.java Sat Sep 29 05:42:59 2012
@@ -54,7 +54,7 @@ public abstract class ScaleTest {
   
   protected void stopTimer(long numEntries, long numBytes) {
     long endTime = System.currentTimeMillis();
-    System.out.printf("ELAPSEDMS %d %d %d\n", (endTime - startTime), numEntries, numBytes);
+    System.out.printf("ELAPSEDMS %d %d %d%n", (endTime - startTime), numEntries, numBytes);
   }
   
   public abstract void setup();

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java Sat Sep 29 05:42:59 2012
@@ -20,13 +20,15 @@ import java.net.InetSocketAddress;
 import java.net.ServerSocket;
 import java.nio.channels.ServerSocketChannel;
 import java.util.TimerTask;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.cloudtrace.instrument.Span;
 import org.apache.accumulo.cloudtrace.thrift.RemoteSpan;
-import org.apache.accumulo.cloudtrace.thrift.SpanReceiver.Processor;
 import org.apache.accumulo.cloudtrace.thrift.SpanReceiver.Iface;
+import org.apache.accumulo.cloudtrace.thrift.SpanReceiver.Processor;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.MutationsRejectedException;
@@ -178,7 +180,7 @@ public class TraceServer implements Watc
     final InetSocketAddress address = new InetSocketAddress(hostname, sock.getLocalPort());
     registerInZooKeeper(AddressUtil.toString(address));
     
-    writer = connector.createBatchWriter(table, 100l * 1024 * 1024, 5 * 1000l, 10);
+    writer = connector.createBatchWriter(table, new BatchWriterConfig().setMaxLatency(5, TimeUnit.SECONDS));
   }
   
   public void run() throws Exception {
@@ -209,7 +211,7 @@ public class TraceServer implements Watc
     } finally {
       writer = null;
       try {
-        writer = connector.createBatchWriter(table, 100l * 1024 * 1024, 5 * 1000l, 10);
+        writer = connector.createBatchWriter(table, new BatchWriterConfig());
       } catch (Exception ex) {
         log.error("Unable to create a batch writer: " + ex);
       }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java Sat Sep 29 05:42:59 2012
@@ -22,6 +22,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.Scanner;
@@ -70,7 +71,7 @@ public class AddFilesWithMissingEntries 
     Set<String> knownFiles = new HashSet<String>();
     
     int count = 0;
-    final MultiTableBatchWriter writer = connector.createMultiTableBatchWriter(100000, 1000, 4);
+    final MultiTableBatchWriter writer = connector.createMultiTableBatchWriter(new BatchWriterConfig());
     
     // collect the list of known files and the directory for each extent
     for (Entry<Key,Value> entry : scanner) {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java Sat Sep 29 05:42:59 2012
@@ -37,7 +37,6 @@ import org.apache.accumulo.core.data.Val
 import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
 import org.apache.accumulo.core.util.CachedConfiguration;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.hadoop.fs.FileSystem;
@@ -119,7 +118,7 @@ public class CheckForMetadataProblems {
     }
     
     scanner.setRange(Constants.METADATA_KEYSPACE);
-    ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
+    Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
     scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
     
     Text colf = new Text();

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/Initialize.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/Initialize.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/Initialize.java Sat Sep 29 05:42:59 2012
@@ -72,6 +72,8 @@ public class Initialize {
   private static final Logger log = Logger.getLogger(Initialize.class);
   private static final String ROOT_USER = "root";
   private static boolean clearInstanceName = false;
+  private static String cliInstanceName = null;
+  private static String cliPassword = null;
   
   private static ConsoleReader reader = null;
   
@@ -372,7 +374,11 @@ public class Initialize {
     String instanceName, instanceNamePath = null;
     boolean exists = true;
     do {
-      instanceName = getConsoleReader().readLine("Instance name : ");
+      if (cliInstanceName == null) {
+        instanceName = getConsoleReader().readLine("Instance name : ");
+      } else {
+        instanceName = cliInstanceName;
+      }
       if (instanceName == null)
         System.exit(0);
       instanceName = instanceName.trim();
@@ -396,6 +402,9 @@ public class Initialize {
   }
   
   private static byte[] getRootPassword() throws IOException {
+    if (cliPassword != null) {
+      return cliPassword.getBytes();
+    }
     String rootpass;
     String confirmpass;
     do {
@@ -453,16 +462,23 @@ public class Initialize {
   public static void main(String[] args) {
     boolean justSecurity = false;
     
-    for (String arg : args) {
-      if (arg.equals("--reset-security")) {
-        justSecurity = true;
-      } else if (arg.equals("--clear-instance-name")) {
-        clearInstanceName = true;
-      } else {
-        RuntimeException e = new RuntimeException();
-        log.fatal("Bad argument " + arg, e);
-        throw e;
-      }
+    for (int i = 0; i < args.length; i++) {
+      if (args[i].equals("--reset-security")) {
+          justSecurity = true;
+        } else if (args[i].equals("--clear-instance-name")) {
+          clearInstanceName = true;
+        } else if (args[i].equals("--instance-name")) {
+            cliInstanceName = args[i+1];
+            i++;
+        } else if (args[i].equals("--password")) {
+            cliPassword = args[i+1];
+            i++;
+        } else {
+          RuntimeException e = new RuntimeException();
+          log.fatal("Usage: [--reset-security] [--clear-instance-name] [--instance-name {name}] [--password {password}]");
+          log.fatal("Bad argument " + args[i], e);
+          throw e;
+        }
     }
     
     try {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java Sat Sep 29 05:42:59 2012
@@ -126,8 +126,8 @@ public class ListInstances {
   }
   
   private static void printHeader() {
-    System.out.printf(" %-" + NAME_WIDTH + "s| %-" + UUID_WIDTH + "s| %-" + MASTER_WIDTH + "s\n", "Instance Name", "Instance ID", "Master");
-    System.out.printf("%" + (NAME_WIDTH + 1) + "s+%" + (UUID_WIDTH + 1) + "s+%" + (MASTER_WIDTH + 1) + "s\n", new CharFiller('-'), new CharFiller('-'),
+    System.out.printf(" %-" + NAME_WIDTH + "s| %-" + UUID_WIDTH + "s| %-" + MASTER_WIDTH + "s%n", "Instance Name", "Instance ID", "Master");
+    System.out.printf("%" + (NAME_WIDTH + 1) + "s+%" + (UUID_WIDTH + 1) + "s+%" + (MASTER_WIDTH + 1) + "s%n", new CharFiller('-'), new CharFiller('-'),
         new CharFiller('-'));
     
   }
@@ -142,7 +142,7 @@ public class ListInstances {
       master = "";
     }
     
-    System.out.printf("%" + NAME_WIDTH + "s |%" + UUID_WIDTH + "s |%" + MASTER_WIDTH + "s\n", "\"" + instanceName + "\"", iid, master);
+    System.out.printf("%" + NAME_WIDTH + "s |%" + UUID_WIDTH + "s |%" + MASTER_WIDTH + "s%n", "\"" + instanceName + "\"", iid, master);
   }
   
   private static String getMaster(UUID iid) {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Sat Sep 29 05:42:59 2012
@@ -35,11 +35,13 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.SortedSet;
 import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.IsolatedScanner;
@@ -111,7 +113,7 @@ public class MetadataTable extends org.a
   }
   
   public static void putLockID(ZooLock zooLock, Mutation m) {
-    ColumnFQ.put(m, Constants.METADATA_LOCK_COLUMN, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/").getBytes()));
+    Constants.METADATA_LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/").getBytes()));
   }
   
   public static void update(AuthInfo credentials, Mutation m) {
@@ -190,7 +192,7 @@ public class MetadataTable extends org.a
     
     if (dfv.getNumEntries() > 0) {
       m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(path), new Value(dfv.encode()));
-      ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(time.getBytes()));
+      Constants.METADATA_TIME_COLUMN.put(m, new Value(time.getBytes()));
       // stuff in this location
       TServerInstance self = getTServerInstance(address, zooLock);
       self.putLastLocation(m);
@@ -210,7 +212,7 @@ public class MetadataTable extends org.a
     if (mergeFile != null)
       m.putDelete(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(mergeFile));
     
-    ColumnFQ.put(m, Constants.METADATA_FLUSH_COLUMN, new Value((flushId + "").getBytes()));
+    Constants.METADATA_FLUSH_COLUMN.put(m, new Value((flushId + "").getBytes()));
     
     update(credentials, zooLock, m);
     
@@ -232,7 +234,7 @@ public class MetadataTable extends org.a
   public static void updateTabletFlushID(KeyExtent extent, long flushID, AuthInfo credentials, ZooLock zooLock) {
     if (!extent.isRootTablet()) {
       Mutation m = new Mutation(extent.getMetadataEntry());
-      ColumnFQ.put(m, Constants.METADATA_FLUSH_COLUMN, new Value((flushID + "").getBytes()));
+      Constants.METADATA_FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes()));
       update(credentials, zooLock, m);
     }
   }
@@ -240,7 +242,7 @@ public class MetadataTable extends org.a
   public static void updateTabletCompactID(KeyExtent extent, long compactID, AuthInfo credentials, ZooLock zooLock) {
     if (!extent.isRootTablet()) {
       Mutation m = new Mutation(extent.getMetadataEntry());
-      ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value((compactID + "").getBytes()));
+      Constants.METADATA_COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes()));
       update(credentials, zooLock, m);
     }
   }
@@ -254,15 +256,15 @@ public class MetadataTable extends org.a
       m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, file, new Value(entry.getValue().encode()));
       m.put(Constants.METADATA_BULKFILE_COLUMN_FAMILY, file, new Value(tidBytes));
     }
-    ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(time.getBytes()));
+    Constants.METADATA_TIME_COLUMN.put(m, new Value(time.getBytes()));
     update(credentials, zooLock, m);
   }
   
   public static void addTablet(KeyExtent extent, String path, AuthInfo credentials, char timeType, ZooLock lock) {
     Mutation m = extent.getPrevRowUpdateMutation();
     
-    ColumnFQ.put(m, Constants.METADATA_DIRECTORY_COLUMN, new Value(path.getBytes()));
-    ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value((timeType + "0").getBytes()));
+    Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(path.getBytes()));
+    Constants.METADATA_TIME_COLUMN.put(m, new Value((timeType + "0").getBytes()));
     
     update(credentials, lock, m);
   }
@@ -379,12 +381,12 @@ public class MetadataTable extends org.a
       Map<String,Long> bulkLoadedFiles, AuthInfo credentials, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) {
     Mutation m = extent.getPrevRowUpdateMutation();
     
-    ColumnFQ.put(m, Constants.METADATA_DIRECTORY_COLUMN, new Value(path.getBytes()));
-    ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(time.getBytes()));
+    Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(path.getBytes()));
+    Constants.METADATA_TIME_COLUMN.put(m, new Value(time.getBytes()));
     if (lastFlushID > 0)
-      ColumnFQ.put(m, Constants.METADATA_FLUSH_COLUMN, new Value(("" + lastFlushID).getBytes()));
+      Constants.METADATA_FLUSH_COLUMN.put(m, new Value(("" + lastFlushID).getBytes()));
     if (lastCompactID > 0)
-      ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value(("" + lastCompactID).getBytes()));
+      Constants.METADATA_COMPACT_COLUMN.put(m, new Value(("" + lastCompactID).getBytes()));
     
     if (location != null) {
       m.put(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY, location.asColumnQualifier(), location.asMutationValue());
@@ -406,19 +408,19 @@ public class MetadataTable extends org.a
   public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, AuthInfo credentials, ZooLock zooLock) {
     Mutation m = extent.getPrevRowUpdateMutation(); //
     
-    ColumnFQ.put(m, Constants.METADATA_SPLIT_RATIO_COLUMN, new Value(Double.toString(splitRatio).getBytes()));
+    Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes()));
     
-    ColumnFQ.put(m, Constants.METADATA_OLD_PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(oldPrevEndRow));
-    ColumnFQ.putDelete(m, Constants.METADATA_CHOPPED_COLUMN);
+    Constants.METADATA_OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(oldPrevEndRow));
+    Constants.METADATA_CHOPPED_COLUMN.putDelete(m);
     update(credentials, zooLock, m);
   }
   
   public static void finishSplit(Text metadataEntry, Map<String,DataFileValue> datafileSizes, List<String> highDatafilesToRemove, AuthInfo credentials,
       ZooLock zooLock) {
     Mutation m = new Mutation(metadataEntry);
-    ColumnFQ.putDelete(m, Constants.METADATA_SPLIT_RATIO_COLUMN);
-    ColumnFQ.putDelete(m, Constants.METADATA_OLD_PREV_ROW_COLUMN);
-    ColumnFQ.putDelete(m, Constants.METADATA_CHOPPED_COLUMN);
+    Constants.METADATA_SPLIT_RATIO_COLUMN.putDelete(m);
+    Constants.METADATA_OLD_PREV_ROW_COLUMN.putDelete(m);
+    Constants.METADATA_CHOPPED_COLUMN.putDelete(m);
     
     for (Entry<String,DataFileValue> entry : datafileSizes.entrySet()) {
       m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(entry.getKey()), new Value(entry.getValue().encode()));
@@ -462,7 +464,7 @@ public class MetadataTable extends org.a
       m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(path), new Value(size.encode()));
     
     if (compactionId != null)
-      ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value(("" + compactionId).getBytes()));
+      Constants.METADATA_COMPACT_COLUMN.put(m, new Value(("" + compactionId).getBytes()));
     
     TServerInstance self = getTServerInstance(address, zooLock);
     self.putLastLocation(m);
@@ -659,7 +661,8 @@ public class MetadataTable extends org.a
   public static void deleteTable(String tableId, boolean insertDeletes, AuthInfo credentials, ZooLock lock) throws AccumuloException {
     Scanner ms = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, Constants.NO_AUTHS);
     Text tableIdText = new Text(tableId);
-    BatchWriter bw = new BatchWriterImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, 1000000, 120000l, 2);
+    BatchWriter bw = new BatchWriterImpl(HdfsZooInstance.getInstance(), credentials, Constants.METADATA_TABLE_ID, new BatchWriterConfig().setMaxMemory(1000000)
+        .setMaxLatency(120000l, TimeUnit.MILLISECONDS).setMaxWriteThreads(2));
     
     // scan metadata for our table and delete everything we find
     Mutation m = null;
@@ -669,7 +672,7 @@ public class MetadataTable extends org.a
     if (insertDeletes) {
       
       ms.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
-      ColumnFQ.fetch(ms, Constants.METADATA_DIRECTORY_COLUMN);
+      Constants.METADATA_DIRECTORY_COLUMN.fetch(ms);
       
       for (Entry<Key,Value> cell : ms) {
         Key key = cell.getKey();
@@ -1008,8 +1011,8 @@ public class MetadataTable extends org.a
     mscanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
     mscanner.fetchColumnFamily(Constants.METADATA_LAST_LOCATION_COLUMN_FAMILY);
     mscanner.fetchColumnFamily(Constants.METADATA_CLONED_COLUMN_FAMILY);
-    ColumnFQ.fetch(mscanner, Constants.METADATA_PREV_ROW_COLUMN);
-    ColumnFQ.fetch(mscanner, Constants.METADATA_TIME_COLUMN);
+    Constants.METADATA_PREV_ROW_COLUMN.fetch(mscanner);
+    Constants.METADATA_TIME_COLUMN.fetch(mscanner);
     return mscanner;
   }
   
@@ -1114,7 +1117,7 @@ public class MetadataTable extends org.a
   public static void cloneTable(Instance instance, String srcTableId, String tableId) throws Exception {
     
     Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
-    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 10000000, 60000l, 1);
+    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
     
     while (true) {
       
@@ -1157,7 +1160,7 @@ public class MetadataTable extends org.a
       Key k = entry.getKey();
       Mutation m = new Mutation(k.getRow());
       m.putDelete(k.getColumnFamily(), k.getColumnQualifier());
-      ColumnFQ.put(m, Constants.METADATA_DIRECTORY_COLUMN, new Value(FastFormat.toZeroPaddedString(dirCount++, 8, 16, "/c-".getBytes())));
+      Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(FastFormat.toZeroPaddedString(dirCount++, 8, 16, "/c-".getBytes())));
       bw.addMutation(m);
     }
     
@@ -1167,7 +1170,7 @@ public class MetadataTable extends org.a
   
   public static void chopped(KeyExtent extent, ZooLock zooLock) {
     Mutation m = new Mutation(extent.getMetadataEntry());
-    ColumnFQ.put(m, Constants.METADATA_CHOPPED_COLUMN, new Value("chopped".getBytes()));
+    Constants.METADATA_CHOPPED_COLUMN.put(m, new Value("chopped".getBytes()));
     update(SecurityConstants.getSystemCredentials(), zooLock, m);
   }
   
@@ -1175,7 +1178,7 @@ public class MetadataTable extends org.a
     Scanner mscanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS));
     mscanner.setRange(new KeyExtent(new Text(tableId), null, null).toMetadataRange());
     mscanner.fetchColumnFamily(Constants.METADATA_BULKFILE_COLUMN_FAMILY);
-    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 10000000, 60000l, 1);
+    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
     for (Entry<Key,Value> entry : mscanner) {
       log.debug("Looking at entry " + entry + " with tid " + tid);
       if (Long.parseLong(entry.getValue().toString()) == tid) {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java Sat Sep 29 05:42:59 2012
@@ -22,6 +22,7 @@ import java.util.Random;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -87,7 +88,7 @@ public class RandomWriter {
     log.info("starting at " + start + " for user " + args[0]);
     try {
       Connector connector = HdfsZooInstance.getInstance().getConnector(args[0], args[1].getBytes());
-      BatchWriter bw = connector.createBatchWriter(table_name, 50000000l, 10 * 60l, 10);
+      BatchWriter bw = connector.createBatchWriter(table_name, new BatchWriterConfig());
       long num_mutations = Long.parseLong(args[2]);
       log.info("Writing " + num_mutations + " mutations...");
       bw.addMutations(new RandomMutationGenerator(num_mutations));

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java Sat Sep 29 05:42:59 2012
@@ -18,8 +18,11 @@ package org.apache.accumulo.server.util;
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.net.Socket;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
@@ -33,6 +36,8 @@ 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.commons.io.filefilter.WildcardFileFilter;
@@ -107,38 +112,55 @@ public class SendLogToChainsaw extends X
     }
   }
   
-  public void processLogFiles() throws Exception {
-    for (File log : logFiles) {
-      // Parse the server type and name from the log file name
-      String threadName = log.getName().substring(0, log.getName().indexOf("."));
-      FileReader fReader = new FileReader(log);
-      BufferedReader reader = new BufferedReader(fReader);
-      
-      String line = reader.readLine();
-      while (null != line) {
-        String out = null;
+  public void processLogFiles() throws IOException {
+    String line = null;
+    String out = null;
+    FileReader fReader = null;
+    BufferedReader reader = null;
+    try {
+      for (File log : logFiles) {
+        // Parse the server type and name from the log file name
+        String threadName = log.getName().substring(0, log.getName().indexOf("."));
         try {
-          out = convertLine(line, threadName);
-          if (null != out) {
-            if (socket != null && socket.isConnected())
-              socket.getOutputStream().write(out.getBytes());
-            else
-              System.err.println("Unable to send data to transport");
-          }
-        } catch (Exception e) {
-          System.out.println("Error processing line: " + line + ". Output was " + out);
+          fReader = new FileReader(log);
+        } catch (FileNotFoundException e) {
+          System.out.println("Unable to find file: " + log.getAbsolutePath());
           throw e;
+	    }
+        reader = new BufferedReader(fReader);
+        
+        try {
+          line = reader.readLine();
+          while (null != line) {
+                out = convertLine(line, threadName);
+                if (null != out) {
+                  if (socket != null && socket.isConnected())
+                    socket.getOutputStream().write(out.getBytes());
+                  else
+                    System.err.println("Unable to send data to transport");
+                }
+              line = reader.readLine();
+            }
+        } catch (IOException e) {
+            System.out.println("Error processing line: " + line + ". Output was " + out);
+            throw e;
+        } finally {
+          if (reader != null) {
+            reader.close();
+          }
+          if (fReader != null) {
+            fReader.close();
+          }
         }
-        line = reader.readLine();
       }
-      reader.close();
-      fReader.close();
+    } finally {
+      if (socket != null && socket.isConnected()) {
+        socket.close();
+      }
     }
-    if (socket != null && socket.isConnected())
-      socket.close();
   }
   
-  private String convertLine(String line, String threadName) throws Exception {
+  private String convertLine(String line, String threadName) throws UnsupportedEncodingException {
     String result = null;
     Matcher m = logPattern.matcher(line);
     if (m.matches()) {
@@ -239,16 +261,28 @@ public class SendLogToChainsaw extends X
   /**
    * 
    * @param args
-   *          parameter 0: path to log directory parameter 1: filter to apply for logs to include (uses wildcards (i.e. logger* and IS case sensitive) parameter
-   *          2: chainsaw host parameter 3: chainsaw port parameter 4: start date filter parameter 5: end date filter parameter 6: optional regex filter to
-   *          match on each log4j message parameter 7: optional level filter
+   *   0: path to log directory parameter 
+   *   1: filter to apply for logs to include (uses wildcards (i.e. logger* and IS case sensitive) parameter
+   *   2: chainsaw host parameter 
+   *   3: chainsaw port parameter 
+   *   4: start date filter parameter 
+   *   5: end date filter parameter 
+   *   6: optional regex filter to match on each log4j message parameter 
+   *   7: optional level filter
    * @throws Exception
    */
   public static void main(String[] args) throws Exception {
     
     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;

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java Sat Sep 29 05:42:59 2012
@@ -18,11 +18,11 @@ package org.apache.accumulo.server.util;
 
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Scanner;
@@ -31,7 +31,6 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
@@ -94,8 +93,8 @@ public class TabletIterator implements I
     this.scanner = s;
     this.range = range;
     this.scanner.setRange(range);
-    ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
-    ColumnFQ.fetch(scanner, Constants.METADATA_DIRECTORY_COLUMN);
+    Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
+    Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
     this.iter = s.iterator();
     this.returnPrevEndRow = returnPrevEndRow;
     this.returnDir = returnDir;

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java Sat Sep 29 05:42:59 2012
@@ -46,7 +46,7 @@ public class TabletServerLocks {
           holder = new String(lockData);
         }
         
-        System.out.printf("%32s %16s\n", tabletServer, holder);
+        System.out.printf("%32s %16s%n", tabletServer, holder);
       }
     } else if (args.length == 2 && args[0].equals("-delete")) {
       ZooLock.deleteLock(tserverPath + "/" + args[1]);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java Sat Sep 29 05:42:59 2012
@@ -30,11 +30,13 @@ import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 
 public class ZooReaderWriter extends org.apache.accumulo.fate.zookeeper.ZooReaderWriter {
+  private static final String SCHEME = "digest";
+  private static final String USER = "accumulo";
   private static ZooReaderWriter instance = null;
   private static IZooReaderWriter retryingInstance = null;
   
-  public ZooReaderWriter(String string, int timeInMillis, String auth) {
-    super(string, timeInMillis, auth);
+  public ZooReaderWriter(String string, int timeInMillis, String secret) {
+    super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes());
   }
   
   public static synchronized ZooReaderWriter getInstance() {

Modified: accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java Sat Sep 29 05:42:59 2012
@@ -25,8 +25,6 @@ import org.apache.accumulo.core.Constant
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.util.ColumnFQ;
-import org.apache.accumulo.server.constraints.MetadataConstraints;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -38,7 +36,7 @@ public class MetadataConstraintsTest {
   public void testCheck() {
     Logger.getLogger(AccumuloConfiguration.class).setLevel(Level.ERROR);
     Mutation m = new Mutation(new Text("0;foo"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("1foo".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("1foo".getBytes()));
     
     MetadataConstraints mc = new MetadataConstraints();
     
@@ -49,7 +47,7 @@ public class MetadataConstraintsTest {
     assertEquals(Short.valueOf((short) 3), violations.get(0));
     
     m = new Mutation(new Text("0:foo"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("1poo".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("1poo".getBytes()));
     
     violations = mc.check(null, m);
     
@@ -67,7 +65,7 @@ public class MetadataConstraintsTest {
     assertEquals(Short.valueOf((short) 2), violations.get(0));
     
     m = new Mutation(new Text("!!<"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("1poo".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("1poo".getBytes()));
     
     violations = mc.check(null, m);
     
@@ -77,7 +75,7 @@ public class MetadataConstraintsTest {
     assertEquals(Short.valueOf((short) 5), violations.get(1));
     
     m = new Mutation(new Text("0;foo"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("".getBytes()));
     
     violations = mc.check(null, m);
     
@@ -86,21 +84,21 @@ public class MetadataConstraintsTest {
     assertEquals(Short.valueOf((short) 6), violations.get(0));
     
     m = new Mutation(new Text("0;foo"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("bar".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
     
     violations = mc.check(null, m);
     
     assertEquals(null, violations);
     
     m = new Mutation(new Text("!0<"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("bar".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
     
     violations = mc.check(null, m);
     
     assertEquals(null, violations);
     
     m = new Mutation(new Text("!1<"));
-    ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, new Value("bar".getBytes()));
+    Constants.METADATA_PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
     
     violations = mc.check(null, m);
     

Modified: accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java Sat Sep 29 05:42:59 2012
@@ -26,6 +26,7 @@ import junit.framework.Assert;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.Scanner;
@@ -117,7 +118,7 @@ public class TestConfirmDeletes {
     Assert.assertEquals(0, count);
 
     Connector conn = instance.getConnector(auth);
-    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 1000, 1000, 1);
+    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
     for (String line : metadata) {
       String[] parts = line.split(" ");
       String[] columnParts = parts[1].split(":");

Modified: accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java Sat Sep 29 05:42:59 2012
@@ -25,6 +25,7 @@ import java.util.Set;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchDeleter;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.MutationsRejectedException;
@@ -35,7 +36,6 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.server.master.state.Assignment;
 import org.apache.accumulo.server.master.state.CurrentState;
 import org.apache.accumulo.server.master.state.MergeInfo;
@@ -80,7 +80,7 @@ public class TestMergeState {
   }
   
   private static void update(Connector c, Mutation m) throws TableNotFoundException, MutationsRejectedException {
-    BatchWriter bw = c.createBatchWriter(Constants.METADATA_TABLE_NAME, 1000l, 1000l, 1);
+    BatchWriter bw = c.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
     bw.addMutation(m);
     bw.close();
   }
@@ -89,7 +89,7 @@ public class TestMergeState {
   public void test() throws Exception {
     Instance instance = new MockInstance();
     Connector connector = instance.getConnector("root", "secret");
-    BatchWriter bw = connector.createBatchWriter("!METADATA", 1000l, 1000l, 1);
+    BatchWriter bw = connector.createBatchWriter("!METADATA", new BatchWriterConfig());
     
     // Create a fake METADATA table with these splits
     String splits[] = {"a", "e", "j", "o", "t", "z"};
@@ -100,7 +100,7 @@ public class TestMergeState {
       Text split = new Text(s);
       Mutation prevRow = KeyExtent.getPrevRowUpdateMutation(new KeyExtent(tableId, split, pr));
       prevRow.put(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY, new Text("123456"), new Value("127.0.0.1:1234".getBytes()));
-      ColumnFQ.put(prevRow, Constants.METADATA_CHOPPED_COLUMN, new Value("junk".getBytes()));
+      Constants.METADATA_CHOPPED_COLUMN.put(prevRow, new Value("junk".getBytes()));
       bw.addMutation(prevRow);
       pr = split;
     }
@@ -126,8 +126,8 @@ public class TestMergeState {
     // Create the hole
     // Split the tablet at one end of the range
     Mutation m = new KeyExtent(tableId, new Text("t"), new Text("p")).getPrevRowUpdateMutation();
-    ColumnFQ.put(m, Constants.METADATA_SPLIT_RATIO_COLUMN, new Value("0.5".getBytes()));
-    ColumnFQ.put(m, Constants.METADATA_OLD_PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(new Text("o")));
+    Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value("0.5".getBytes()));
+    Constants.METADATA_OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(new Text("o")));
     update(connector, m);
     
     // do the state check
@@ -148,7 +148,7 @@ public class TestMergeState {
     // finish the split
     KeyExtent tablet = new KeyExtent(tableId, new Text("p"), new Text("o"));
     m = tablet.getPrevRowUpdateMutation();
-    ColumnFQ.put(m, Constants.METADATA_SPLIT_RATIO_COLUMN, new Value("0.5".getBytes()));
+    Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value("0.5".getBytes()));
     update(connector, m);
     metaDataStateStore.setLocations(Collections.singletonList(new Assignment(tablet, state.someTServer)));
     
@@ -158,7 +158,7 @@ public class TestMergeState {
     
     // chop it
     m = tablet.getPrevRowUpdateMutation();
-    ColumnFQ.put(m, Constants.METADATA_CHOPPED_COLUMN, new Value("junk".getBytes()));
+    Constants.METADATA_CHOPPED_COLUMN.put(m, new Value("junk".getBytes()));
     update(connector, m);
 
     stats = scan(state, metaDataStateStore);



Mime
View raw message