hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject svn commit: r1547464 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java
Date Tue, 03 Dec 2013 16:35:43 GMT
Author: ndimiduk
Date: Tue Dec  3 16:35:43 2013
New Revision: 1547464

URL: http://svn.apache.org/r1547464
Log:
Optional setBatch for CopyTable to copy large rows in batches

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java?rev=1547464&r1=1547463&r2=1547464&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormat.java
Tue Dec  3 16:35:43 2013
@@ -68,6 +68,8 @@ implements Configurable {
   public static final String SCAN_CACHEBLOCKS = "hbase.mapreduce.scan.cacheblocks";
   /** The number of rows for caching that will be passed to scanners. */
   public static final String SCAN_CACHEDROWS = "hbase.mapreduce.scan.cachedrows";
+  /** Set the maximum number of values to return for each call to next(). */
+  public static final String SCAN_BATCHSIZE = "hbase.mapreduce.scan.batchsize";
 
   /** The configuration. */
   private Configuration conf = null;
@@ -147,6 +149,10 @@ implements Configurable {
           scan.setCaching(Integer.parseInt(conf.get(SCAN_CACHEDROWS)));
         }
 
+        if (conf.get(SCAN_BATCHSIZE) != null) {
+          scan.setBatch(Integer.parseInt(conf.get(SCAN_BATCHSIZE)));
+        }
+
         // false by default, full table scans generate too much BC churn
         scan.setCacheBlocks((conf.getBoolean(SCAN_CACHEBLOCKS, false)));
       } catch (Exception e) {



Mime
View raw message