accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1391754 [9/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-standalo...
Date Sat, 29 Sep 2012 05:43:13 GMT
Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/Master.java Sat Sep 29 05:42:59 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;
@@ -84,7 +85,6 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.core.util.CachedConfiguration;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.Daemon;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
@@ -131,6 +131,8 @@ import org.apache.accumulo.server.master
 import org.apache.accumulo.server.master.tableOps.CompactRange;
 import org.apache.accumulo.server.master.tableOps.CreateTable;
 import org.apache.accumulo.server.master.tableOps.DeleteTable;
+import org.apache.accumulo.server.master.tableOps.ExportTable;
+import org.apache.accumulo.server.master.tableOps.ImportTable;
 import org.apache.accumulo.server.master.tableOps.RenameTable;
 import org.apache.accumulo.server.master.tableOps.TableRangeOp;
 import org.apache.accumulo.server.master.tableOps.TraceRepo;
@@ -336,9 +338,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_*"));
@@ -581,8 +583,8 @@ public class Master implements LiveTServ
         try {
           Connector conn = getConnector();
           Scanner scanner = new IsolatedScanner(conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS));
-          ColumnFQ.fetch(scanner, Constants.METADATA_FLUSH_COLUMN);
-          ColumnFQ.fetch(scanner, Constants.METADATA_DIRECTORY_COLUMN);
+          Constants.METADATA_FLUSH_COLUMN.fetch(scanner);
+          Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
           scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
           scanner.fetchColumnFamily(Constants.METADATA_LOG_COLUMN_FAMILY);
           scanner.setRange(new KeyExtent(new Text(tableId), null, ByteBufferUtil.toText(startRow)).toMetadataRange());
@@ -1007,6 +1009,34 @@ public class Master implements LiveTServ
           fate.seedTransaction(opid, new TraceRepo<Master>(new CompactRange(tableId, startRow, endRow, iterators)), autoCleanup);
           break;
         }
+        case IMPORT: {
+          String tableName = ByteBufferUtil.toString(arguments.get(0));
+          String exportDir = ByteBufferUtil.toString(arguments.get(1));
+          
+          if (!security.canImport(c, checkTableId(tableName, TableOperation.IMPORT)))
+            throw new ThriftSecurityException(c.user, SecurityErrorCode.PERMISSION_DENIED);
+
+          checkNotMetadataTable(tableName, TableOperation.CREATE);
+          checkTableName(tableName, TableOperation.CREATE);
+          
+          fate.seedTransaction(opid, new TraceRepo<Master>(new ImportTable(c.user, tableName, exportDir)), autoCleanup);
+          break;
+        }
+        case EXPORT: {
+          String tableName = ByteBufferUtil.toString(arguments.get(0));
+          String exportDir = ByteBufferUtil.toString(arguments.get(1));
+          
+          String tableId = checkTableId(tableName, TableOperation.EXPORT);
+          
+          if (!security.canExport(c, tableId))
+            throw new ThriftSecurityException(c.user, SecurityErrorCode.PERMISSION_DENIED);
+
+          checkNotMetadataTable(tableName, TableOperation.EXPORT);
+          
+          fate.seedTransaction(opid, new TraceRepo<Master>(new ExportTable(tableName, tableId, exportDir)), autoCleanup);
+          break;
+        }
+
         default:
           throw new UnsupportedOperationException();
       }
@@ -1556,8 +1586,8 @@ public class Master implements LiveTServ
             range.getEndRow()), true);
         Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
         scanner.setRange(deleteRange);
-        ColumnFQ.fetch(scanner, Constants.METADATA_DIRECTORY_COLUMN);
-        ColumnFQ.fetch(scanner, Constants.METADATA_TIME_COLUMN);
+        Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
+        Constants.METADATA_TIME_COLUMN.fetch(scanner);
         scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
         scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
         Set<String> datafiles = new TreeSet<String>();
@@ -1582,8 +1612,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 {
@@ -1592,11 +1622,11 @@ 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());
-            ColumnFQ.put(m, Constants.METADATA_PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(range.getPrevEndRow()));
-            ColumnFQ.putDelete(m, Constants.METADATA_CHOPPED_COLUMN);
+            Constants.METADATA_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(range.getPrevEndRow()));
+            Constants.METADATA_CHOPPED_COLUMN.putDelete(m);
             bw.addMutation(m);
             bw.flush();
           } finally {
@@ -1633,12 +1663,12 @@ 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);
-        ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
-        ColumnFQ.fetch(scanner, Constants.METADATA_TIME_COLUMN);
-        ColumnFQ.fetch(scanner, Constants.METADATA_DIRECTORY_COLUMN);
+        Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
+        Constants.METADATA_TIME_COLUMN.fetch(scanner);
+        Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
         scanner.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
         Mutation m = new Mutation(stopRow);
         String maxLogicalTime = null;
@@ -1666,7 +1696,7 @@ public class Master implements LiveTServ
         if (range.isMeta())
           last = last.clip(Constants.METADATA_ROOT_TABLET_KEYSPACE);
         scanner.setRange(last);
-        ColumnFQ.fetch(scanner, Constants.METADATA_TIME_COLUMN);
+        Constants.METADATA_TIME_COLUMN.fetch(scanner);
         for (Entry<Key,Value> entry : scanner) {
           if (Constants.METADATA_TIME_COLUMN.hasColumns(entry.getKey())) {
             maxLogicalTime = TabletTime.maxMetadataTime(maxLogicalTime, entry.getValue().toString());
@@ -1674,7 +1704,7 @@ public class Master implements LiveTServ
         }
         
         if (maxLogicalTime != null)
-          ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(maxLogicalTime.getBytes()));
+          Constants.METADATA_TIME_COLUMN.put(m, new Value(maxLogicalTime.getBytes()));
         
         if (!m.getUpdates().isEmpty()) {
           bw.addMutation(m);
@@ -1699,7 +1729,7 @@ public class Master implements LiveTServ
         
         // Clean-up the last chopped marker
         m = new Mutation(stopRow);
-        ColumnFQ.putDelete(m, Constants.METADATA_CHOPPED_COLUMN);
+        Constants.METADATA_CHOPPED_COLUMN.putDelete(m);
         bw.addMutation(m);
         bw.flush();
         
@@ -1749,7 +1779,7 @@ public class Master implements LiveTServ
       try {
         Connector conn = getConnector();
         Scanner scanner = conn.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
-        ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
+        Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
         KeyExtent start = new KeyExtent(range.getTableId(), range.getEndRow(), null);
         scanner.setRange(new Range(start.getMetadataEntry(), null));
         Iterator<Entry<Key,Value>> iterator = scanner.iterator();
@@ -1834,7 +1864,7 @@ public class Master implements LiveTServ
     private void cleanupMutations() throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
       Connector connector = getConnector();
       Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
-      ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
+      Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
       Set<KeyExtent> found = new HashSet<KeyExtent>();
       for (Entry<Key,Value> entry : scanner) {
         KeyExtent extent = new KeyExtent(entry.getKey().getRow(), entry.getValue());

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java Sat Sep 29 05:42:59 2012
@@ -70,6 +70,13 @@ public class SubmitFileForRecovery exten
               log.error("Unable to check on the recovery status of " + file, ex);
             }
             break;
+          case NodeChildrenChanged:
+          case NodeCreated:
+          case NodeDataChanged:
+          case None:
+          default:
+            /* do nothing. */
+            break;
         }
       }
       

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java Sat Sep 29 05:42:59 2012
@@ -41,7 +41,6 @@ import org.apache.accumulo.core.data.Ran
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.WholeRowIterator;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
 
@@ -66,7 +65,7 @@ public class MetaDataTableScanner implem
   }
 
   static public void configureScanner(ScannerBase scanner, CurrentState state) {
-    ColumnFQ.fetch(scanner, Constants.METADATA_PREV_ROW_COLUMN);
+    Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
     scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
     scanner.fetchColumnFamily(Constants.METADATA_FUTURE_LOCATION_COLUMN_FAMILY);
     scanner.fetchColumnFamily(Constants.METADATA_LOG_COLUMN_FAMILY);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/RootTabletStateStore.java Sat Sep 29 05:42:59 2012
@@ -20,10 +20,7 @@ import java.util.Iterator;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.core.data.KeyExtent;
-import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.security.thrift.AuthInfo;
-import org.apache.hadoop.io.Text;
 
 public class RootTabletStateStore extends MetaDataStateStore {
   

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java Sat Sep 29 05:42:59 2012
@@ -132,7 +132,7 @@ public class TabletStateChangeIterator e
           if (!shouldBeOnline)
             return;
         case ASSIGNED_TO_DEAD_SERVER:
-          /* fall-through intentional */
+          return;
         case UNASSIGNED:
           if (shouldBeOnline)
             return;

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java Sat Sep 29 05:42:59 2012
@@ -87,7 +87,7 @@ public class TableManager {
     return tableStateCache.get(tableId);
   }
   
-  public class IllegalTableTransitionException extends Exception {
+  public static class IllegalTableTransitionException extends Exception {
     private static final long serialVersionUID = 1L;
     
     final TableState oldState;

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/BulkImport.java Sat Sep 29 05:42:59 2012
@@ -46,7 +46,6 @@ import org.apache.accumulo.core.client.i
 import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.thrift.ClientService;
 import org.apache.accumulo.core.client.impl.thrift.ClientService.Client;
-import org.apache.accumulo.core.client.impl.thrift.ClientService.Iface;
 import org.apache.accumulo.core.client.impl.thrift.TableOperation;
 import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java Sat Sep 29 05:42:59 2012
@@ -40,7 +40,6 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.tabletserver.thrift.IteratorConfig;
 import org.apache.accumulo.core.tabletserver.thrift.TIteratorSetting;
-import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
@@ -88,8 +87,8 @@ class CompactionDriver extends MasterRep
       range = range.clip(new Range(Constants.ROOT_TABLET_EXTENT.getMetadataEntry(), false, null, true));
     
     scanner.setRange(range);
-    ColumnFQ.fetch(scanner, Constants.METADATA_COMPACT_COLUMN);
-    ColumnFQ.fetch(scanner, Constants.METADATA_DIRECTORY_COLUMN);
+    Constants.METADATA_COMPACT_COLUMN.fetch(scanner);
+    Constants.METADATA_DIRECTORY_COLUMN.fetch(scanner);
     scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
     
     // TODO since not using tablet iterator, are there any issues w/ splits merges?

Copied: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java (from r1391624, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java)
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java?p2=accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java&p1=accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java&r1=1391624&r2=1391754&rev=1391754&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java Sat Sep 29 05:42:59 2012
@@ -31,7 +31,6 @@ import java.util.zip.ZipEntry;
 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;
@@ -47,15 +46,16 @@ import org.apache.accumulo.core.data.Val
 import org.apache.accumulo.core.file.FileOperations;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.TablePermission;
+import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.tables.TableManager;
-import org.apache.accumulo.server.security.Authenticator;
+import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityConstants;
-import org.apache.accumulo.server.security.ZKAuthenticator;
+import org.apache.accumulo.server.security.SecurityOperation;
 import org.apache.accumulo.server.tabletserver.UniqueNameAllocator;
 import org.apache.accumulo.server.test.FastFormat;
 import org.apache.accumulo.server.util.MetadataTable;
@@ -476,13 +476,13 @@ class ImportSetupPermissions extends Mas
   @Override
   public Repo<Master> call(long tid, Master env) throws Exception {
     // give all table permissions to the creator
-    Authenticator authenticator = ZKAuthenticator.getInstance();
+    SecurityOperation security = AuditedSecurityOperation.getInstance();
     for (TablePermission permission : TablePermission.values()) {
       try {
-        authenticator.grantTablePermission(SecurityConstants.getSystemCredentials(), tableInfo.user, tableInfo.tableId, permission);
-      } catch (AccumuloSecurityException e) {
+        security.grantTablePermission(SecurityConstants.getSystemCredentials(), tableInfo.user, tableInfo.tableId, permission);
+      } catch (ThriftSecurityException e) {
         Logger.getLogger(ImportSetupPermissions.class).error(e.getMessage(), e);
-        throw e.asThriftException();
+        throw e;
       }
     }
     
@@ -494,7 +494,7 @@ class ImportSetupPermissions extends Mas
   
   @Override
   public void undo(long tid, Master env) throws Exception {
-    ZKAuthenticator.getInstance().deleteTable(SecurityConstants.getSystemCredentials(), tableInfo.tableId);
+    AuditedSecurityOperation.getInstance().deleteTable(SecurityConstants.getSystemCredentials(), tableInfo.tableId);
   }
 }
 

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/master/tableOps/TableRangeOp.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java Sat Sep 29 05:42:59 2012
@@ -17,7 +17,6 @@
 package org.apache.accumulo.server.monitor.servlets;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.lang.management.ManagementFactory;
 import java.util.ArrayList;
 
@@ -119,8 +118,8 @@ public class VisServlet extends BasicSer
   protected void pageBody(HttpServletRequest req, HttpServletResponse response, StringBuilder sb) throws IOException {
     StringBuffer urlsb = req.getRequestURL();
     urlsb.setLength(urlsb.lastIndexOf("/") + 1);
-    String url = urlsb.toString();
     VisualizationConfig cfg = new VisualizationConfig();
+    cfg.url = urlsb.toString();
     
     String s = req.getParameter("shape");
     if (s != null && (s.equals("square") || s.equals("squares"))) {
@@ -231,18 +230,6 @@ public class VisServlet extends BasicSer
     sb.append("var numNormalStats = ").append(StatType.values().length - StatType.numDerived()).append(";\n");
     sb.append("</script>\n");
     
-    InputStream data = VisServlet.class.getClassLoader().getResourceAsStream("web/vis.xml");
-    if (data != null) {
-      byte[] buffer = new byte[1024];
-      int n;
-      try {
-        while ((n = data.read(buffer)) > 0)
-          sb.append(new String(buffer, 0, n));
-      } catch (IOException e) {
-        e.printStackTrace();
-        return;
-      }
-    }
-    sb.append("\n");
+    sb.append("<script src='web/vis.js' type='text/javascript'></script>");
   }
 }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/NullScanner.java Sat Sep 29 05:42:59 2012
@@ -18,6 +18,7 @@ package org.apache.accumulo.server.monit
 
 import java.util.Iterator;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
@@ -90,4 +91,12 @@ public class NullScanner implements Scan
   @Override
   public void removeScanIterator(String iteratorName) {}
   
+  @Override
+  public void setTimeout(long timeOut, TimeUnit timeUnit) {}
+  
+  @Override
+  public long getTimeout(TimeUnit timeUnit) {
+    return 0;
+  }
+  
 }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/ShowTrace.java Sat Sep 29 05:42:59 2012
@@ -98,8 +98,8 @@ public class ShowTrace extends Basic {
       @Override
       public void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children) {
         sb.append("<tr>\n");
-        sb.append(String.format("<td class='right'>%d+</td><td class='left'>%d</td>\n", node.stop - node.start, node.start - finalStart));
-        sb.append(String.format("<td style='text-indent: %dpx'>%s@%s</td>\n", level * 5, node.svc, node.sender));
+        sb.append(String.format("<td class='right'>%d+</td><td class='left'>%d</td>%n", node.stop - node.start, node.start - finalStart));
+        sb.append(String.format("<td style='text-indent: %dpx'>%s@%s</td>%n", level * 5, node.svc, node.sender));
         sb.append("<td>" + node.description + "</td>");
         boolean hasData = node.data != null && !node.data.isEmpty();
         if (hasData)
@@ -112,7 +112,7 @@ public class ShowTrace extends Basic {
         sb.append("  <table class='indent,noborder'>\n");
         for (Entry<String,String> entry : node.data.entrySet()) {
           sb.append("  <tr><td>" + BasicServlet.sanitize(entry.getKey()) + "</td>");
-          sb.append("<td>" + BasicServlet.sanitize(entry.getValue()) + "</td></tr>\n");
+          sb.append("<td>" + BasicServlet.sanitize(entry.getValue()) + "</td></tr>%n");
         }
         sb.append("  </table>");
         sb.append("</td>\n");

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java Sat Sep 29 05:42:59 2012
@@ -817,4 +817,14 @@ public class SecurityOperation {
       throw new ThriftSecurityException(credentials.user, SecurityErrorCode.TABLE_DOESNT_EXIST);
     }
   }
+
+  public boolean canExport(AuthInfo credentials, String tableId) throws ThriftSecurityException {
+    authenticate(credentials);
+    return hasTablePermission(credentials.user, tableId, TablePermission.READ, false);
+  }
+  
+  public boolean canImport(AuthInfo credentials, String tableId) throws ThriftSecurityException {
+    authenticate(credentials);
+    return hasSystemPermission(credentials.user, SystemPermission.CREATE_TABLE, false);
+  }
 }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java Sat Sep 29 05:42:59 2012
@@ -193,7 +193,7 @@ public class LargestFirstMemoryManager i
   
   public static void main(String[] args) {
     for (int i = 0; i < 62; i++) {
-      System.out.printf("%d\t%d\n", i, timeMemoryLoad(1, i * 60000l));
+      System.out.printf("%d\t%d%n", i, timeMemoryLoad(1, i * 60000l));
     }
   }
 }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java Sat Sep 29 05:42:59 2012
@@ -3055,7 +3055,7 @@ public class Tablet {
           if (candidate.compareRow(lastRow) != 0) {
             // we should use this ratio in split size estimations
             if (log.isTraceEnabled())
-              log.trace(String.format("Splitting at %6.2f instead of .5, row at .5 is same as end row\n", keys.firstKey()));
+              log.trace(String.format("Splitting at %6.2f instead of .5, row at .5 is same as end row%n", keys.firstKey()));
             return new SplitRowSpec(keys.firstKey(), candidate.getRow());
           }
           

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java Sat Sep 29 05:42:59 2012
@@ -523,6 +523,10 @@ public class TabletServer extends Abstra
               case FINISHED:
                 state = ScanState.IDLE;
                 break;
+              case RUNNING:
+              default:
+                /* do nothing */
+                break;
             }
           }
           
@@ -545,6 +549,10 @@ public class TabletServer extends Abstra
               case FINISHED:
                 state = ScanState.IDLE;
                 break;
+              case RUNNING:
+              default:
+                /* do nothing */
+                break;
             }
           }
           

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/log/MultiReader.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/log/MultiReader.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/log/MultiReader.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/tabletserver/log/MultiReader.java Sat Sep 29 05:42:59 2012
@@ -26,9 +26,9 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.DataOutputBuffer;
+import org.apache.hadoop.io.MapFile.Reader;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
-import org.apache.hadoop.io.MapFile.Reader;
 
 /**
  * Provide simple Map.Reader methods over multiple Maps.
@@ -135,7 +135,7 @@ public class MultiReader {
       Index index = (Index) obj;
       try {
         WritableComparable found = index.reader.getClosest(key, index.value, true);
-        if (found != null && found.compareTo(key) == 0) {
+        if (found != null && found.equals(key)) {
           result = true;
         }
       } catch (EOFException ex) {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/CreateTestTable.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/EstimateInMemMapOverhead.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/EstimateInMemMapOverhead.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/EstimateInMemMapOverhead.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/EstimateInMemMapOverhead.java Sat Sep 29 05:42:59 2012
@@ -63,7 +63,7 @@ abstract class MemoryUsageTest {
     double diff = actualBytesPerEntry - expectedBytesPerEntry;
     double ratio = actualBytesPerEntry / expectedBytesPerEntry * 100;
     
-    System.out.printf("%30s | %,10d | %6.2fGB | %6.2f | %6.2f | %6.2f | %6.2f%s\n", getName(), getNumPasses(), memSize / (1024 * 1024 * 1024.0),
+    System.out.printf("%30s | %,10d | %6.2fGB | %6.2f | %6.2f | %6.2f | %6.2f%s%n", getName(), getNumPasses(), memSize / (1024 * 1024 * 1024.0),
         actualBytesPerEntry, expectedBytesPerEntry, diff, ratio, "%");
     
     clear();

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/GCLotsOfCandidatesTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapConcurrencyTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapConcurrencyTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapConcurrencyTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapConcurrencyTest.java Sat Sep 29 05:42:59 2012
@@ -63,7 +63,7 @@ public class NativeMapConcurrencyTest {
     }
     long t2 = System.currentTimeMillis();
     
-    System.out.printf("inserted %,d in %,d %,d %,6.2f\n", (numRows * numCols), (t2 - t1), nm.size(), rate((numRows * numCols), (t2 - t1)));
+    System.out.printf("inserted %,d in %,d %,d %,6.2f%n", (numRows * numCols), (t2 - t1), nm.size(), rate((numRows * numCols), (t2 - t1)));
   }
   
   private static double rate(int num, long ms) {
@@ -107,7 +107,7 @@ public class NativeMapConcurrencyTest {
         
         long t2 = System.currentTimeMillis();
         
-        System.out.printf("%d %,d %,d %,d %,d %,6.2f\n", Thread.currentThread().getId(), (t2 - t1), t1, t2, count, rate(count, (t2 - t1)));
+        System.out.printf("%d %,d %,d %,d %,d %,6.2f%n", Thread.currentThread().getId(), (t2 - t1), t1, t2, count, rate(count, (t2 - t1)));
       }
     }
     

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapPerformanceTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapPerformanceTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapPerformanceTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NativeMapPerformanceTest.java Sat Sep 29 05:42:59 2012
@@ -169,7 +169,7 @@ public class NativeMapPerformanceTest {
     
     UtilWaitThread.sleep(3000);
     
-    System.out.printf("mapType:%10s   put rate:%,6.2f  scan rate:%,6.2f  get rate:%,6.2f  delete time : %6.2f  mem : %,d\n", "" + mapType, (numRows * numCols)
+    System.out.printf("mapType:%10s   put rate:%,6.2f  scan rate:%,6.2f  get rate:%,6.2f  delete time : %6.2f  mem : %,d%n", "" + mapType, (numRows * numCols)
         / ((tpe - tps) / 1000.0), (size) / ((tie - tis) / 1000.0), numLookups / ((tge - tgs) / 1000.0), (tde - tds) / 1000.0, memUsed);
     
   }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NullBatchWriter.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NullBatchWriter.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NullBatchWriter.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/NullBatchWriter.java Sat Sep 29 05:42:59 2012
@@ -48,7 +48,7 @@ public class NullBatchWriter implements 
   
   @Override
   public void flush() throws MutationsRejectedException {
-    System.out.printf("Mutation add rate : %,6.2f mutations/sec\n", mutationsAdded / ((System.currentTimeMillis() - startTime) / 1000.0));
+    System.out.printf("Mutation add rate : %,6.2f mutations/sec%n", mutationsAdded / ((System.currentTimeMillis() - startTime) / 1000.0));
     mutationsAdded = 0;
   }
   

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/QueryMetadataTable.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/QueryMetadataTable.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/QueryMetadataTable.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/QueryMetadataTable.java Sat Sep 29 05:42:59 2012
@@ -128,7 +128,7 @@ public class QueryMetadataTable {
     for (Entry<Key,Value> entry : scanner) {
       System.out.print(".");
       if (count % 72 == 0) {
-        System.out.printf(" %,d\n", count);
+        System.out.printf(" %,d%n", count);
       }
       if (entry.getKey().compareRow(mdrow) == 0 && entry.getKey().getColumnFamily().compareTo(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY) == 0) {
         System.out.println(entry.getKey() + " " + entry.getValue());
@@ -141,7 +141,7 @@ public class QueryMetadataTable {
       
     }
     
-    System.out.printf(" %,d\n", count);
+    System.out.printf(" %,d%n", count);
     
     ArrayList<Text> rows = new ArrayList<Text>(rowSet);
     

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestBinaryRows.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.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++) {
@@ -152,8 +153,8 @@ public class TestBinaryRows {
         
         long t2 = System.currentTimeMillis();
         
-        System.out.printf("time : %9.2f secs\n", ((t2 - t1) / 1000.0));
-        System.out.printf("rate : %9.2f entries/sec\n", num / ((t2 - t1) / 1000.0));
+        System.out.printf("time : %9.2f secs%n", ((t2 - t1) / 1000.0));
+        System.out.printf("rate : %9.2f entries/sec%n", num / ((t2 - t1) / 1000.0));
         
       } else if (mode.equals("randomLookups")) {
         int numLookups = 1000;
@@ -194,9 +195,9 @@ public class TestBinaryRows {
         
         long t2 = System.currentTimeMillis();
         
-        System.out.printf("time    : %9.2f secs\n", ((t2 - t1) / 1000.0));
-        System.out.printf("lookups : %9d keys\n", numLookups);
-        System.out.printf("rate    : %9.2f lookups/sec\n", numLookups / ((t2 - t1) / 1000.0));
+        System.out.printf("time    : %9.2f secs%n", ((t2 - t1) / 1000.0));
+        System.out.printf("lookups : %9d keys%n", numLookups);
+        System.out.printf("rate    : %9.2f lookups/sec%n", numLookups / ((t2 - t1) / 1000.0));
         
       } else if (mode.equals("split")) {
         TreeSet<Text> splits = new TreeSet<Text>();
@@ -207,7 +208,7 @@ public class TestBinaryRows {
           long splitPoint = i << shift;
           
           splits.add(new Text(encodeLong(splitPoint)));
-          System.out.printf("added split point 0x%016x  %,12d\n", splitPoint, splitPoint);
+          System.out.printf("added split point 0x%016x  %,12d%n", splitPoint, splitPoint);
         }
         
         connector.tableOperations().create(table);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestIngest.java Sat Sep 29 05:42:59 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;
@@ -286,7 +287,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());
         connector.securityOperations().changeUserAuthorizations(rootCredentials.user, AUTHS);
       }
       
@@ -403,7 +404,7 @@ public class TestIngest {
       int totalValues = ingestArgs.rows * ingestArgs.cols;
       double elapsed = (stopTime - startTime) / 1000.0;
       
-      System.out.printf("%,12d records written | %,8d records/sec | %,12d bytes written | %,8d bytes/sec | %6.3f secs   \n", totalValues,
+      System.out.printf("%,12d records written | %,8d records/sec | %,12d bytes written | %,8d bytes/sec | %6.3f secs   %n", totalValues,
           (int) (totalValues / elapsed), bytesWritten, (int) (bytesWritten / elapsed), elapsed);
     } catch (Exception e) {
       throw new RuntimeException(e);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestMultiTableIngest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/TestRandomDeletes.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/VerifyIngest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/VerifyIngest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/VerifyIngest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/VerifyIngest.java Sat Sep 29 05:42:59 2012
@@ -230,7 +230,7 @@ public class VerifyIngest {
         log.error("Did not read expected number of rows. Saw " + (expectedRow - ingestArgs.startRow) + " expected " + ingestArgs.rows);
         System.exit(1);
       } else {
-        System.out.printf("%,12d records read | %,8d records/sec | %,12d bytes read | %,8d bytes/sec | %6.3f secs   \n", recsRead,
+        System.out.printf("%,12d records read | %,8d records/sec | %,12d bytes read | %,8d bytes/sec | %6.3f secs   %n", recsRead,
             (int) ((recsRead) / ((t2 - t1) / 1000.0)), bytesRead, (int) (bytesRead / ((t2 - t1) / 1000.0)), (t2 - t1) / 1000.0);
       }
       

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousBatchWalker.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousBatchWalker.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousBatchWalker.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousBatchWalker.java Sat Sep 29 05:42:59 2012
@@ -148,12 +148,12 @@ public class ContinuousBatchWalker {
       copy1.removeAll(batch);
       copy2.removeAll(rowsSeen);
       
-      System.out.printf("DIF %d %d %d\n", t1, copy1.size(), copy2.size());
-      System.err.printf("DIF %d %d %d\n", t1, copy1.size(), copy2.size());
+      System.out.printf("DIF %d %d %d%n", t1, copy1.size(), copy2.size());
+      System.err.printf("DIF %d %d %d%n", t1, copy1.size(), copy2.size());
       System.err.println("Extra seen : " + copy1);
       System.err.println("Not seen   : " + copy2);
     } else {
-      System.out.printf("BRQ %d %d %d %d %d\n", t1, (t2 - t1), rowsSeen.size(), count, (int) (rowsSeen.size() / ((t2 - t1) / 1000.0)));
+      System.out.printf("BRQ %d %d %d %d %d%n", t1, (t2 - t1), rowsSeen.size(), count, (int) (rowsSeen.size() / ((t2 - t1) / 1000.0)));
     }
     
   }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousIngest.java Sat Sep 29 05:42:59 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,14 +118,15 @@ 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();
     
     byte[] ingestInstanceId = UUID.randomUUID().toString().getBytes();
     
-    System.out.printf("UUID %d %s\n", System.currentTimeMillis(), new String(ingestInstanceId));
+    System.out.printf("UUID %d %s%n", System.currentTimeMillis(), new String(ingestInstanceId));
     
     long count = 0;
     final int flushInterval = 1000000;
@@ -197,7 +200,7 @@ public class ContinuousIngest {
     long t1 = System.currentTimeMillis();
     bw.flush();
     long t2 = System.currentTimeMillis();
-    System.out.printf("FLUSH %d %d %d %d %d\n", t2, (t2 - lastFlushTime), (t2 - t1), count, flushInterval);
+    System.out.printf("FLUSH %d %d %d %d %d%n", t2, (t2 - lastFlushTime), (t2 - t1), count, flushInterval);
     lastFlushTime = t2;
     return lastFlushTime;
   }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousQuery.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousQuery.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousQuery.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousQuery.java Sat Sep 29 05:42:59 2012
@@ -67,7 +67,7 @@ public class ContinuousQuery {
       }
       long t2 = System.currentTimeMillis();
       
-      System.out.printf("SRQ %d %s %d %d\n", t1, new String(row), (t2 - t1), count);
+      System.out.printf("SRQ %d %s %d %d%n", t1, new String(row), (t2 - t1), count);
       
       if (sleepTime > 0)
         Thread.sleep(sleepTime);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousScanner.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousScanner.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousScanner.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousScanner.java Sat Sep 29 05:42:59 2012
@@ -131,7 +131,7 @@ public class ContinuousScanner {
         // System.out.println("P2 "+delta +" "+numToScan+" "+distance+"  "+((double)numToScan/count ));
       }
       
-      System.out.printf("SCN %d %s %d %d\n", t1, new String(scanStart), (t2 - t1), count);
+      System.out.printf("SCN %d %s %d %d%n", t1, new String(scanStart), (t2 - t1), count);
       
       if (sleepTime > 0)
         UtilWaitThread.sleep(sleepTime);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousWalk.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousWalk.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousWalk.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/ContinuousWalk.java Sat Sep 29 05:42:59 2012
@@ -134,13 +134,13 @@ public class ContinuousWalk {
         }
         long t2 = System.currentTimeMillis();
         
-        System.out.printf("SRQ %d %s %d %d\n", t1, row, (t2 - t1), values.size());
+        System.out.printf("SRQ %d %s %d %d%n", t1, row, (t2 - t1), values.size());
         
         if (values.size() > 0) {
           row = getPrevRow(values.get(r.nextInt(values.size())));
         } else {
-          System.out.printf("MIS %d %s\n", t1, row);
-          System.err.printf("MIS %d %s\n", t1, row);
+          System.out.printf("MIS %d %s%n", t1, row);
+          System.err.printf("MIS %d %s%n", t1, row);
           row = null;
         }
         
@@ -174,7 +174,7 @@ public class ContinuousWalk {
     
     long t2 = System.currentTimeMillis();
     
-    System.out.printf("FSR %d %s %d %d\n", t1, new String(scanStart), (t2 - t1), count);
+    System.out.printf("FSR %d %s %d %d%n", t1, new String(scanStart), (t2 - t1), count);
     
     return pr;
   }

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/Histogram.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/Histogram.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/Histogram.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/continuous/Histogram.java Sat Sep 29 05:42:59 2012
@@ -136,11 +136,11 @@ public class Histogram<T> implements Ser
       
       psum += getPercentage(hd.bin);
       
-      System.out.printf(" %" + (maxValueLen + 1) + "s %,16d %6.2f%s %6.2f%s\n", hd.bin + "", hd.count, getPercentage(hd.bin), "%", psum, "%");
+      System.out.printf(" %" + (maxValueLen + 1) + "s %,16d %6.2f%s %6.2f%s%n", hd.bin + "", hd.count, getPercentage(hd.bin), "%", psum, "%");
     }
     
     System.out.println();
-    System.out.printf(" %" + (maxValueLen + 1) + "s %,16d \n", "TOTAL", sum);
+    System.out.printf(" %" + (maxValueLen + 1) + "s %,16d %n", "TOTAL", sum);
   }
   
   public void save(String file) throws IOException {

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/AddSplitTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BadIteratorMincTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchScanSplitTest.java Sat Sep 29 05:42:59 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)));
@@ -112,7 +113,7 @@ public class BatchScanSplitTest extends 
       
       long t2 = System.currentTimeMillis();
       
-      System.out.printf("rate : %06.2f\n", ranges.size() / ((t2 - t1) / 1000.0));
+      System.out.printf("rate : %06.2f%n", ranges.size() / ((t2 - t1) / 1000.0));
       
       if (!found.equals(expected))
         throw new Exception("Found and expected differ " + found + " " + expected);

Modified: accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BatchWriterFlushTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/BloomFilterTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConcurrencyTest.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.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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/ConstraintTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/CreateAndUseTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteEverythingTest.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;
@@ -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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsSplitTest.java Sat Sep 29 05:42:59 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/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java?rev=1391754&r1=1391753&r2=1391754&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java (original)
+++ accumulo/branches/ACCUMULO-259/server/src/main/java/org/apache/accumulo/server/test/functional/DeleteRowsTest.java Sat Sep 29 05:42:59 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);



Mime
View raw message