accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1429975 - in /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli: BatchScannerOpts.java BatchWriterOpts.java ScannerOpts.java
Date Mon, 07 Jan 2013 19:25:02 GMT
Author: ecn
Date: Mon Jan  7 19:25:02 2013
New Revision: 1429975

URL: http://svn.apache.org/viewvc?rev=1429975&view=rev
Log:
ACCUMULO-745 add missing files (doh!)

Added:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java 
 (with props)
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java  
(with props)
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java   (with
props)

Added: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java?rev=1429975&view=auto
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java (added)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java Mon
Jan  7 19:25:02 2013
@@ -0,0 +1,14 @@
+package org.apache.accumulo.core.cli;
+
+import org.apache.accumulo.core.cli.ClientOpts.TimeConverter;
+
+import com.beust.jcommander.Parameter;
+
+public class BatchScannerOpts {
+  @Parameter(names="--scanThreads", description="Number of threads to use when batch scanning")
+  public Integer scanThreads = 10;
+  
+  @Parameter(names="--scanTimeout", converter=TimeConverter.class, description="timeout used
to fail a batch scan")
+  public Long scanTimeout = Long.MAX_VALUE;
+  
+}

Propchange: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java?rev=1429975&view=auto
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java (added)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java Mon
Jan  7 19:25:02 2013
@@ -0,0 +1,34 @@
+package org.apache.accumulo.core.cli;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.accumulo.core.cli.ClientOpts.MemoryConverter;
+import org.apache.accumulo.core.cli.ClientOpts.TimeConverter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
+
+import com.beust.jcommander.Parameter;
+
+public class BatchWriterOpts {
+  private static final BatchWriterConfig BWDEFAULTS = new BatchWriterConfig();
+  
+  @Parameter(names="--batchThreads", description="Number of threads to use when writing large
batches")
+  public Integer batchThreads = BWDEFAULTS.getMaxWriteThreads();
+
+  @Parameter(names="--batchLatency", converter=TimeConverter.class, description="The maximum
time to wait before flushing data to servers when writing")
+  public Long batchLatency = BWDEFAULTS.getMaxLatency(TimeUnit.MILLISECONDS);
+  
+  @Parameter(names="--batchMemory", converter=MemoryConverter.class, description="memory
used to batch data when writing")
+  public Long batchMemory = BWDEFAULTS.getMaxMemory();
+  
+  @Parameter(names="--batchTimeout", converter=TimeConverter.class, description="timeout
used to fail a batch write")
+  public Long batchTimeout = BWDEFAULTS.getTimeout(TimeUnit.MILLISECONDS);
+  
+  public BatchWriterConfig getBatchWriterConfig() {
+    BatchWriterConfig config = new BatchWriterConfig();
+    config.setMaxLatency(this.batchLatency, TimeUnit.MILLISECONDS);
+    config.setMaxMemory(this.batchMemory);
+    config.setTimeout(this.batchTimeout, TimeUnit.MILLISECONDS);
+    return config;
+  }
+  
+}

Propchange: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java?rev=1429975&view=auto
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java (added)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java Mon Jan
 7 19:25:02 2013
@@ -0,0 +1,8 @@
+package org.apache.accumulo.core.cli;
+
+import com.beust.jcommander.Parameter;
+
+public class ScannerOpts {
+  @Parameter(names="--scanBatchSize", description="the number of key-values to pull during
a scan")
+  public int scanBatchSize = 1000; 
+}

Propchange: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message