hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11436 Support start Row and stop Row in HBase Export (Ward Viaene)
Date Sun, 29 Jun 2014 18:09:28 GMT
Repository: hbase
Updated Branches:
  refs/heads/master c591a25f3 -> dce252082


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/dce25208
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/dce25208
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/dce25208

Branch: refs/heads/master
Commit: dce252082870660d22017313dcd10099e316f428
Parents: c591a25
Author: Ted Yu <tedyu@apache.org>
Authored: Sun Jun 29 18:09:18 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Sun Jun 29 18:09:18 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/dce25208/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 e926f76..a69d4e4 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"
         + "   -Dmapreduce.map.speculative=false\n"


Mime
View raw message