You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2014/06/29 20:08:37 UTC
git commit: HBASE-11436 Support start Row and stop Row in HBase
Export (Ward Viaene
Repository: hbase
Updated Branches:
refs/heads/0.98 a543e3947 -> 5f853cb89
HBASE-11436 Support start Row and stop Row in HBase Export (Ward Viaene
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5f853cb8
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5f853cb8
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5f853cb8
Branch: refs/heads/0.98
Commit: 5f853cb891b2f87087547aa4c28ef7e248d7a078
Parents: a543e39
Author: Ted Yu <te...@apache.org>
Authored: Sun Jun 29 18:08:17 2014 +0000
Committer: Ted Yu <te...@apache.org>
Committed: Sun Jun 29 18:08:17 2014 +0000
----------------------------------------------------------------------
.../main/java/org/apache/hadoop/hbase/mapreduce/Export.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/5f853cb8/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
index fd5f6b5..578efd7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
@@ -95,6 +95,13 @@ public class Export {
s.setTimeRange(startTime, endTime);
// Set cache blocks
s.setCacheBlocks(false);
+ // set Start and Stop row
+ if (conf.get(TableInputFormat.SCAN_ROW_START) != null) {
+ s.setStartRow(Bytes.toBytes(conf.get(TableInputFormat.SCAN_ROW_START)));
+ }
+ if (conf.get(TableInputFormat.SCAN_ROW_STOP) != null) {
+ s.setStopRow(Bytes.toBytes(conf.get(TableInputFormat.SCAN_ROW_STOP)));
+ }
// Set Scan Column Family
boolean raw = Boolean.parseBoolean(conf.get(RAW_SCAN));
if (raw) {
@@ -155,6 +162,8 @@ public class Export {
System.err.println(" to control/limit what is exported..");
System.err.println(" -D " + TableInputFormat.SCAN_COLUMN_FAMILY + "=<familyName>");
System.err.println(" -D " + RAW_SCAN + "=true");
+ System.err.println(" -D " + TableInputFormat.SCAN_ROW_START + "=<ROWSTART>");
+ System.err.println(" -D " + TableInputFormat.SCAN_ROW_STOP + "=<ROWSTOP>");
System.err.println("For performance consider the following properties:\n"
+ " -Dhbase.client.scanner.caching=100\n"
+ " -Dmapred.map.tasks.speculative.execution=false\n"