hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@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, 06 May 2015 05:36:20 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 fd19f8d44 -> be397afc1


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

Branch: refs/heads/branch-1.0
Commit: be397afc15f85be14dfb6a13473491fbe04ff5fe
Parents: fd19f8d
Author: Lars Hofhansl <larsh@apache.org>
Authored: Tue May 5 22:36:58 2015 -0700
Committer: Lars Hofhansl <larsh@apache.org>
Committed: Tue May 5 22:36:58 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/be397afc/bin/region_mover.rb
----------------------------------------------------------------------
diff --git a/bin/region_mover.rb b/bin/region_mover.rb
index a2d4182..134b032 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