Optional setBatch for CopyTable to copy large rows in batches

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1547464 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ndimiduk 2013-12-03 16:35:43 +00:00
parent 969a276679
commit 2f18891991
1 changed files with 6 additions and 0 deletions

View File

@ -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) {