hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-12957 region_mover#isSuccessfulScan may be extremely slow on region with lots of expired data (Hongyu Bi)
Date Wed, 04 Feb 2015 04:07:33 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 e3032b177 -> 118f738d7


HBASE-12957 region_mover#isSuccessfulScan may be extremely slow on region with lots of expired
data (Hongyu Bi)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/118f738d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/118f738d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/118f738d

Branch: refs/heads/branch-1
Commit: 118f738d7ccb3f5f0c3e724bb67183e0440c201d
Parents: e3032b1
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Feb 3 20:07:23 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Feb 3 20:07:23 2015 -0800

----------------------------------------------------------------------
 bin/region_mover.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/118f738d/bin/region_mover.rb
----------------------------------------------------------------------
diff --git a/bin/region_mover.rb b/bin/region_mover.rb
index 7a09854..78979d9 100644
--- a/bin/region_mover.rb
+++ b/bin/region_mover.rb
@@ -31,6 +31,8 @@ import org.apache.hadoop.hbase.client.Scan
 import org.apache.hadoop.hbase.client.HTable
 import org.apache.hadoop.hbase.client.HConnectionManager
 import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
+import org.apache.hadoop.hbase.filter.InclusiveStopFilter;
+import org.apache.hadoop.hbase.filter.FilterList;
 import org.apache.hadoop.hbase.util.Bytes
 import org.apache.hadoop.hbase.util.Writables
 import org.apache.hadoop.conf.Configuration
@@ -95,10 +97,10 @@ end
 # Trys to scan a row from passed region
 # Throws exception if can't
 def isSuccessfulScan(admin, r)
-  scan = Scan.new(r.getStartKey()) 
+  scan = Scan.new(r.getStartKey(), r.getStartKey())
   scan.setBatch(1)
   scan.setCaching(1)
-  scan.setFilter(FirstKeyOnlyFilter.new()) 
+  scan.setFilter(FilterList.new(FirstKeyOnlyFilter.new(),InclusiveStopFilter().new(r.getStartKey())))
   begin
     table = HTable.new(admin.getConfiguration(), r.getTableName())
     scanner = table.getScanner(scan)


Mime
View raw message