accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1387182 [2/3] - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/client/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/client/mapreduce/ core/src/main/java/org/apache/ac...
Date Tue, 18 Sep 2012 14:25:40 GMT
Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java Tue Sep 18 14:25:37 2012
@@ -44,6 +44,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.IsolatedScanner;
@@ -339,9 +340,9 @@ public class Master implements LiveTServ
               // add delete entries to metadata table for bulk dirs
               
               log.info("Adding bulk dir delete entries to !METADATA table for upgrade");
-
-              BatchWriter bw = getConnector().createBatchWriter(Constants.METADATA_TABLE_NAME, 10000000, 60000l, 4);
               
+              BatchWriter bw = getConnector().createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
+
               FileStatus[] tables = fs.globStatus(new Path(Constants.getTablesDir(getSystemConfiguration()) + "/*"));
               for (FileStatus tableDir : tables) {
                 FileStatus[] bulkDirs = fs.globStatus(new Path(tableDir.getPath() + "/bulk_*"));
@@ -1632,8 +1633,8 @@ public class Master implements LiveTServ
           }
         }
         MetadataTable.addDeleteEntries(range, datafiles, SecurityConstants.getSystemCredentials());
-        
-        BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 1000000l, 100l, 1);
+        BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME,
+ new BatchWriterConfig());
         try {
           deleteTablets(deleteRange, bw, conn);
         } finally {
@@ -1642,7 +1643,7 @@ public class Master implements LiveTServ
 
         if (followingTablet != null) {
           log.debug("Updating prevRow of " + followingTablet + " to " + range.getPrevEndRow());
-          bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 1000l, 100l, 1);
+          bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
           try {
             Mutation m = new Mutation(followingTablet.getMetadataEntry());
             Constants.METADATA_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(range.getPrevEndRow()));
@@ -1683,7 +1684,7 @@ public class Master implements LiveTServ
         long fileCount = 0;
         Connector conn = getConnector();
         // Make file entries in highest tablet
-        bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 1000000L, 1000L, 1);
+        bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
         Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
         scanner.setRange(scanRange);
         Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java Tue Sep 18 14:25:37 2012
@@ -18,9 +18,11 @@ package org.apache.accumulo.server.maste
 
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
 
 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.Instance;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -80,7 +82,8 @@ public class MetaDataStateStore extends 
   
   BatchWriter createBatchWriter() {
     try {
-      return instance.getConnector(auths).createBatchWriter(Constants.METADATA_TABLE_NAME, MAX_MEMORY, LATENCY, THREADS);
+      return instance.getConnector(auths).createBatchWriter(Constants.METADATA_TABLE_NAME,
+          new BatchWriterConfig().setMaxMemory(MAX_MEMORY).setMaxLatency(LATENCY, TimeUnit.MILLISECONDS).setMaxWriteThreads(THREADS));
     } catch (TableNotFoundException e) {
       // ya, I don't think so
       throw new RuntimeException(e);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java Tue Sep 18 14:25:37 2012
@@ -33,6 +33,7 @@ import java.util.zip.ZipInputStream;
 import org.apache.accumulo.core.Constants;
 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.Instance;
 import org.apache.accumulo.core.client.admin.TableOperationsImpl;
 import org.apache.accumulo.core.client.impl.Tables;
@@ -205,7 +206,7 @@ class PopulateMetadataTable extends Mast
       FileSystem fs = environment.getFileSystem();
       
       mbw = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemCredentials())
-          .createBatchWriter(Constants.METADATA_TABLE_NAME, 1000000, 60000l, 2);
+          .createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
 
       zis = new ZipInputStream(fs.open(path));
       

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java Tue Sep 18 14:25:37 2012
@@ -18,6 +18,7 @@ package org.apache.accumulo.server.maste
 
 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.impl.thrift.TableOperation;
@@ -54,15 +55,13 @@ import org.apache.hadoop.io.Text;
 class MakeDeleteEntries extends MasterRepo {
   
   private static final long serialVersionUID = 1L;
-  private static final long ARBITRARY_BUFFER_SIZE = 10000;
-  private static final long ARBITRARY_LATENCY = 1000;
 
   @Override
   public Repo<Master> call(long tid, Master master) throws Exception {
     log.info("creating delete entries for merged metadata tablets");
     Instance instance = master.getInstance();
     Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
-    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, ARBITRARY_BUFFER_SIZE, ARBITRARY_LATENCY, 1);
+    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
     AccumuloConfiguration conf = instance.getConfiguration();
     String tableDir = Constants.getMetadataTableDir(conf);
     for (FileStatus fs : master.getFileSystem().listStatus(new Path(tableDir))) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java Tue Sep 18 14:25:37 2012
@@ -21,6 +21,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.data.Key;
@@ -108,7 +109,7 @@ public class CreateTestTable {
       // presplit
       connector.tableOperations().create(table);
       connector.tableOperations().addSplits(table, keys);
-      BatchWriter b = connector.createBatchWriter(table, 10000000l, 1000000l, 10);
+      BatchWriter b = connector.createBatchWriter(table, new BatchWriterConfig());
       
       // populate
       for (int i = 0; i < count; i++) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java Tue Sep 18 14:25:37 2012
@@ -20,6 +20,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.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -41,7 +42,7 @@ public class GCLotsOfCandidatesTest {
   private static void generateCandidates(Connector conn) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
       MutationsRejectedException {
     conn.securityOperations().grantTablePermission(conn.whoami(), Constants.METADATA_TABLE_NAME, TablePermission.WRITE);
-    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, 1L << 20, 0l, 2);
+    BatchWriter bw = conn.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
     
     for (int i = 0; i < 10000; ++i) {
       final Text emptyText = new Text("");

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java Tue Sep 18 14:25:37 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.data.Key;
@@ -91,7 +92,7 @@ public class TestBinaryRows {
       Logger.getLogger(Constants.CORE_PACKAGE_NAME).setLevel(Level.DEBUG);
       
       if (mode.equals("ingest") || mode.equals("delete")) {
-        BatchWriter bw = connector.createBatchWriter(table, 20000000l, 60l, 8);
+        BatchWriter bw = connector.createBatchWriter(table, new BatchWriterConfig());
         boolean delete = mode.equals("delete");
         
         for (long i = 0; i < num; i++) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java Tue Sep 18 14:25:37 2012
@@ -25,6 +25,7 @@ import org.apache.accumulo.cloudtrace.in
 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;
@@ -288,7 +289,7 @@ public class TestIngest {
         writer.startDefaultLocalityGroup();
       } else {
         Connector connector = instance.getConnector(rootCredentials.user, rootCredentials.password);
-        bw = connector.createBatchWriter("test_ingest", 20000000l, 60000l, 10);
+        bw = connector.createBatchWriter("test_ingest", new BatchWriterConfig());
       }
       
       Authenticator authenticator = ZKAuthenticator.getInstance();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java Tue Sep 18 14:25:37 2012
@@ -22,6 +22,7 @@ import java.util.Map.Entry;
 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.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.MutationsRejectedException;
@@ -121,7 +122,7 @@ public class TestMultiTableIngest {
       
       MultiTableBatchWriter b;
       try {
-        b = connector.createMultiTableBatchWriter(10000000, 1000000, 10);
+        b = connector.createMultiTableBatchWriter(new BatchWriterConfig());
       } catch (Exception e) {
         throw new RuntimeException(e);
       }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java Tue Sep 18 14:25:37 2012
@@ -23,6 +23,7 @@ import java.util.Set;
 import java.util.TreeSet;
 
 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.data.Column;
@@ -92,7 +93,7 @@ public class TestRandomDeletes {
     java.util.Collections.shuffle(entries);
     
     Connector connector = HdfsZooInstance.getInstance().getConnector(credentials.user, credentials.password);
-    BatchWriter mutations = connector.createBatchWriter(t.toString(), 10000l, 10000l, 4);
+    BatchWriter mutations = connector.createBatchWriter(t.toString(), new BatchWriterConfig());
     ColumnVisibility cv = new ColumnVisibility("L1&L2&G1&GROUP2");
     
     for (int i = 0; i < (entries.size() + 1) / 2; i++) {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java Tue Sep 18 14:25:37 2012
@@ -20,6 +20,7 @@ import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.Random;
 import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 import java.util.zip.CRC32;
 import java.util.zip.Checksum;
 
@@ -29,6 +30,7 @@ import org.apache.accumulo.cloudtrace.in
 import org.apache.accumulo.cloudtrace.instrument.receivers.ZooSpanClient;
 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;
@@ -116,7 +118,8 @@ public class ContinuousIngest {
         conn.tableOperations().create(table);
       } catch (TableExistsException tee) {}
 
-    BatchWriter bw = conn.createBatchWriter(table, maxMemory, maxLatency, maxWriteThreads);
+    BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig().setMaxMemory(maxMemory).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS)
+        .setMaxWriteThreads(maxWriteThreads));
     bw = Trace.wrapAll(bw, new CountSampler(1024));
     
     Random r = new Random();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java Tue Sep 18 14:25:37 2012
@@ -21,13 +21,14 @@ import java.util.Collections;
 import java.util.Iterator;
 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.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.MutationsRejectedException;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -131,7 +132,7 @@ public class AddSplitTest extends Functi
   }
   
   private void insertData(long ts) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException {
-    BatchWriter bw = getConnector().createBatchWriter("foo", 10000000, 60000l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("foo", new BatchWriterConfig());
     
     for (int i = 0; i < 10000; i++) {
       String row = String.format("%09d", i);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java Tue Sep 18 14:25:37 2012
@@ -23,6 +23,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;
@@ -52,7 +53,7 @@ public class BadIteratorMincTest extends
   @Override
   public void run() throws Exception {
     
-    BatchWriter bw = getConnector().createBatchWriter("foo", 1000000, 60000l, 2);
+    BatchWriter bw = getConnector().createBatchWriter("foo", new BatchWriterConfig());
     
     Mutation m = new Mutation(new Text("r1"));
     m.put(new Text("acf"), new Text("foo"), new Value("1".getBytes()));

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java Tue Sep 18 14:25:37 2012
@@ -22,12 +22,13 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Random;
 import java.util.Map.Entry;
+import java.util.Random;
 
 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.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -60,7 +61,7 @@ public class BatchScanSplitTest extends 
     
     int numRows = 1 << 18;
     
-    BatchWriter bw = getConnector().createBatchWriter("bss", 10000000, 60000l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("bss", new BatchWriterConfig());
     
     for (int i = 0; i < numRows; i++) {
       Mutation m = new Mutation(new Text(String.format("%09x", i)));

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java Tue Sep 18 14:25:37 2012
@@ -21,13 +21,14 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Random;
 import java.util.Map.Entry;
+import java.util.Random;
 
 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.MutationsRejectedException;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -70,7 +71,7 @@ public class BatchWriterFlushTest extend
   
   private void runLatencyTest() throws Exception {
     // should automatically flush after 3 seconds
-    BatchWriter bw = getConnector().createBatchWriter("bwlt", 42000000l, 3000l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("bwlt", new BatchWriterConfig());
     Scanner scanner = getConnector().createScanner("bwlt", Constants.NO_AUTHS);
     
     Mutation m = new Mutation(new Text(String.format("r_%10d", 1)));
@@ -104,7 +105,7 @@ public class BatchWriterFlushTest extend
   }
   
   private void runFlushTest() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException, Exception {
-    BatchWriter bw = getConnector().createBatchWriter("bwft", 42000000l, 20l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("bwft", new BatchWriterConfig());
     Scanner scanner = getConnector().createScanner("bwft", Constants.NO_AUTHS);
     Random r = new Random();
     

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java Tue Sep 18 14:25:37 2012
@@ -27,6 +27,7 @@ import java.util.Random;
 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.Scanner;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -75,7 +76,7 @@ public class BloomFilterTest extends Fun
     write("bt3", 3, 0, 1000000000, 10000);
     
     // test inserting an empty key
-    BatchWriter bw = getConnector().createBatchWriter("bt4", 1000000l, 60l, 3);
+    BatchWriter bw = getConnector().createBatchWriter("bt4", new BatchWriterConfig());
     Mutation m = new Mutation(new Text(""));
     m.put(new Text(""), new Text(""), new Value("foo1".getBytes()));
     bw.addMutation(m);
@@ -167,7 +168,7 @@ public class BloomFilterTest extends Fun
   
   private void write(String table, int depth, long start, long end, int step) throws Exception {
     
-    BatchWriter bw = getConnector().createBatchWriter(table, 1000000l, 60l, 3);
+    BatchWriter bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
     
     for (long i = start; i < end; i += step) {
       String key = String.format("k_%010d", i);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java Tue Sep 18 14:25:37 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.Connector;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
@@ -86,7 +87,7 @@ public class ConcurrencyTest extends Fun
   
   @Override
   public void run() throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter("cct", 10000000, 60000l, 1);
+    BatchWriter bw = getConnector().createBatchWriter("cct", new BatchWriterConfig());
     for (int i = 0; i < 50; i++) {
       Mutation m = new Mutation(new Text(String.format("%06d", i)));
       m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes()));

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java Tue Sep 18 14:25:37 2012
@@ -26,6 +26,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.MutationsRejectedException;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.conf.Property;
@@ -72,7 +73,7 @@ public class ConstraintTest extends Func
   }
   
   private void test1() throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter("ct", 100000, 60000l, 1);
+    BatchWriter bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
     
     Mutation mut1 = new Mutation(new Text("r1"));
     mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes()));
@@ -82,7 +83,7 @@ public class ConstraintTest extends Func
     // should not throw any exceptions
     bw.close();
     
-    bw = getConnector().createBatchWriter("ct", 100000, 60000l, 1);
+    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
     
     // create a mutation with a non numeric value
     Mutation mut2 = new Mutation(new Text("r1"));
@@ -143,7 +144,7 @@ public class ConstraintTest extends Func
     UtilWaitThread.sleep(1000);
     
     // now should be able to add a non numeric value
-    bw = getConnector().createBatchWriter("ct", 100000, 60000l, 1);
+    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
     bw.addMutation(mut2);
     bw.close();
     
@@ -166,7 +167,7 @@ public class ConstraintTest extends Func
     UtilWaitThread.sleep(1000);
     
     // add a mutation
-    bw = getConnector().createBatchWriter("ct", 100000, 60000l, 1);
+    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
     
     Mutation mut3 = new Mutation(new Text("r1"));
     mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes()));
@@ -206,7 +207,7 @@ public class ConstraintTest extends Func
     UtilWaitThread.sleep(1000);
     
     // try the mutation again
-    bw = getConnector().createBatchWriter("ct", 100000, 60000l, 1);
+    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
     bw.addMutation(mut3);
     bw.close();
     
@@ -236,7 +237,7 @@ public class ConstraintTest extends Func
     // should go through
     int numericErrors = 2;
     
-    BatchWriter bw = getConnector().createBatchWriter(table, 100000, 60000l, 1);
+    BatchWriter bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
     bw.addMutation(newMut("r1", "cf1", "cq1", "123"));
     bw.addMutation(newMut("r1", "cf1", "cq2", "I'm a bad value"));
     if (doFlush) {
@@ -250,7 +251,7 @@ public class ConstraintTest extends Func
         } catch (MutationsRejectedException ex) {
           // ignored
         }
-        bw = getConnector().createBatchWriter(table, 100000, 60000l, 1);
+        bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
         numericErrors = 1;
       }
     }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java Tue Sep 18 14:25:37 2012
@@ -20,13 +20,14 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.SortedSet;
 import java.util.TreeSet;
-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.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -66,7 +67,7 @@ public class CreateAndUseTest extends Fu
     
     getConnector().tableOperations().create("t1");
     getConnector().tableOperations().addSplits("t1", splits);
-    BatchWriter bw = getConnector().createBatchWriter("t1", 100000, Long.MAX_VALUE, 3);
+    BatchWriter bw = getConnector().createBatchWriter("t1", new BatchWriterConfig());
     
     for (int i = 1; i < 257; i++) {
       Mutation m = new Mutation(new Text(String.format("%08x", (i << 8) - 16)));

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java Tue Sep 18 14:25:37 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;
@@ -52,7 +53,7 @@ public class DeleteEverythingTest extend
   
   @Override
   public void run() throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter("de", 1000000, 60000l, 1);
+    BatchWriter bw = getConnector().createBatchWriter("de", new BatchWriterConfig());
     Mutation m = new Mutation(new Text("foo"));
     m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes()));
     bw.addMutation(m);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java Tue Sep 18 14:25:37 2012
@@ -27,6 +27,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.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -142,7 +143,7 @@ public class DeleteRowsSplitTest extends
   }
   
   private void fillTable(String table) throws Exception {
-    BatchWriter bw = getConnector().createBatchWriter(TABLE, 100000l, 1000l, 2);
+    BatchWriter bw = getConnector().createBatchWriter(TABLE, new BatchWriterConfig());
     for (String row : ROWS) {
       Mutation m = new Mutation(row);
       m.put("cf", "cq", "value");

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java Tue Sep 18 14:25:37 2012
@@ -28,6 +28,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.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -102,7 +103,7 @@ public class DeleteRowsTest extends Func
   private void testSplit(String table, String start, String end, String result, int entries) throws Exception {
     // Put a bunch of rows on each tablet
     this.getConnector().tableOperations().create(table);
-    BatchWriter bw = this.getConnector().createBatchWriter(table, 100000l, 1000l, 2);
+    BatchWriter bw = this.getConnector().createBatchWriter(table, new BatchWriterConfig());
     for (String row : ROWS) {
       for (int j = 0; j < ROWS_PER_TABLET; j++) {
         Mutation m = new Mutation(row + j);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LargeRowTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/LogicalTimeTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/MergeTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/PermissionsTest.java Tue Sep 18 14:25:37 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;
@@ -343,7 +344,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);
@@ -381,7 +382,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);
@@ -450,7 +451,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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/RowDeleteTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanIteratorTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanRangeTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ScanSessionTimeOutTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/ServerSideErrorTest.java Tue Sep 18 14:25:37 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()));

Added: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SlowConstraint.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SlowConstraint.java?rev=1387182&view=auto
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SlowConstraint.java (added)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SlowConstraint.java Tue Sep 18 14:25:37 2012
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.server.test.functional;
+
+import java.util.List;
+
+import org.apache.accumulo.core.constraints.Constraint;
+import org.apache.accumulo.core.data.Mutation;
+import org.apache.accumulo.core.util.UtilWaitThread;
+
+/**
+ * 
+ */
+public class SlowConstraint implements Constraint {
+  
+  @Override
+  public String getViolationDescription(short violationCode) {
+    return null;
+  }
+  
+  @Override
+  public List<Short> check(Environment env, Mutation mutation) {
+    UtilWaitThread.sleep(20000);
+    return null;
+  }
+  
+}

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/SparseColumnFamilyTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/TimeoutTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/TimeoutTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/TimeoutTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/TimeoutTest.java Tue Sep 18 14:25:37 2012
@@ -20,11 +20,15 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 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.IteratorSetting;
+import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TimedOutException;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -49,10 +53,40 @@ public class TimeoutTest extends Functio
   
   @Override
   public void run() throws Exception {
+    testBatchScannerTimeout();
+    testBatchWriterTimeout();
+  }
 
+  public void testBatchWriterTimeout() throws Exception {
+    Connector conn = getConnector();
+    
+    conn.tableOperations().create("foo1");
+    
+    conn.tableOperations().addConstraint("foo1", SlowConstraint.class.getName());
+    
+    // give constraint time to propogate through zookeeper
+    UtilWaitThread.sleep(250);
+    
+    BatchWriter bw = conn.createBatchWriter("foo1", new BatchWriterConfig().setTimeout(3, TimeUnit.SECONDS));
+    
+    Mutation mut = new Mutation("r1");
+    mut.put("cf1", "cq1", "v1");
+    
+    bw.addMutation(mut);
+    try {
+      bw.close();
+      throw new Exception("batch writer did not timeout");
+    } catch (MutationsRejectedException mre) {
+      if (!(mre.getCause() instanceof TimedOutException)) {
+        throw mre;
+      }
+    }
+  }
+  
+  public void testBatchScannerTimeout() throws Exception {
     getConnector().tableOperations().create("timeout");
     
-    BatchWriter bw = getConnector().createBatchWriter("timeout", 1000000, 60000, 1);
+    BatchWriter bw = getConnector().createBatchWriter("timeout", new BatchWriterConfig());
     
     Mutation m = new Mutation("r1");
     m.put("cf1", "cq1", "v1");
@@ -82,7 +116,7 @@ public class TimeoutTest extends Functio
       for (Entry<Key,Value> entry : bs) {
         entry.getKey();
       }
-      throw new Exception("Did not time out");
+      throw new Exception("batch scanner did not time out");
     } catch (TimedOutException toe) {
       // toe.printStackTrace();
     }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/functional/VisibilityTest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/performance/metadata/MetadataBatchScanTest.java Tue Sep 18 14:25:37 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;
@@ -81,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();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/State.java Tue Sep 18 14:25:37 2012
@@ -20,7 +20,9 @@ import java.io.File;
 import java.lang.management.ManagementFactory;
 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;
@@ -104,9 +106,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/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/concurrent/BatchWrite.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/security/TableOp.java Tue Sep 18 14:25:37 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;
@@ -134,7 +135,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/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/scalability/Ingest.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java Tue Sep 18 14:25:37 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/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Tue Sep 18 14:25:37 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;
@@ -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;
@@ -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) {
       
@@ -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/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/RandomWriter.java Tue Sep 18 14:25:37 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/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java (original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/gc/TestConfirmDeletes.java Tue Sep 18 14:25:37 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/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java (original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java Tue Sep 18 14:25:37 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;
@@ -79,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();
   }
@@ -88,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"};

Modified: accumulo/trunk/server/src/test/java/org/apache/accumulo/server/test/iterator/RegExTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/test/iterator/RegExTest.java?rev=1387182&r1=1387181&r2=1387182&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/test/iterator/RegExTest.java (original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/test/iterator/RegExTest.java Tue Sep 18 14:25:37 2012
@@ -23,6 +23,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.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.IteratorSetting;
@@ -46,7 +47,7 @@ public class RegExTest {
   public void runTest() throws Exception {
     conn = inst.getConnector("user", "pass");
     conn.tableOperations().create("ret");
-    BatchWriter bw = conn.createBatchWriter("ret", 100000l, 60l, 1);
+    BatchWriter bw = conn.createBatchWriter("ret", new BatchWriterConfig());
     
     ArrayList<Character> chars = new ArrayList<Character>();
     for (char c = 'a'; c <= 'z'; c++)



Mime
View raw message