hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-12608 region_mover.rb does not log moving region count correctly when loading regions (cuijianwei)
Date Sat, 27 Dec 2014 18:37:53 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 8426f1f53 -> 8aadc5de1


HBASE-12608 region_mover.rb does not log moving region count correctly when loading regions
(cuijianwei)


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

Branch: refs/heads/master
Commit: 8aadc5de1ee2292d8361bda9b6d18dc85add33f6
Parents: 8426f1f
Author: stack <stack@apache.org>
Authored: Sat Dec 27 10:37:40 2014 -0800
Committer: stack <stack@apache.org>
Committed: Sat Dec 27 10:37:40 2014 -0800

----------------------------------------------------------------------
 bin/region_mover.rb | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8aadc5de/bin/region_mover.rb
----------------------------------------------------------------------
diff --git a/bin/region_mover.rb b/bin/region_mover.rb
index 465ffa0..7dfedd1 100644
--- a/bin/region_mover.rb
+++ b/bin/region_mover.rb
@@ -344,7 +344,6 @@ def unloadRegions(options, hostname, port)
     # Remove those already tried to move
     rs.removeAll(movedRegions)
     break if rs.length == 0
-    count = 0
     $LOG.info("Moving " + rs.length.to_s + " region(s) from " + servername +
       " on " + servers.length.to_s + " servers using " + options[:maxthreads].to_s + " threads.")
     counter = 0
@@ -398,7 +397,6 @@ def loadRegions(options, hostname, port)
     sleep 0.5
   end
   $LOG.info("Moving " + regions.size().to_s + " regions to " + servername)
-  count = 0
   # sleep 20s to make sure the rs finished initialization.
   sleep 20
   counter = 0
@@ -415,13 +413,13 @@ def loadRegions(options, hostname, port)
     next unless exists
     currentServer = getServerNameForRegion(admin, r)
     if currentServer and currentServer == servername
-      $LOG.info("Region " + r.getRegionNameAsString() + " (" + count.to_s +
+      $LOG.info("Region " + r.getRegionNameAsString() + " (" + counter.to_s +
         " of " + regions.length.to_s + ") already on target server=" + servername)
       counter = counter + 1
       next
     end
-    pool.launch(r,currentServer,count) do |_r,_currentServer,_count|
-      $LOG.info("Moving region " + _r.getRegionNameAsString() + " (" + (_count + 1).to_s
+
+    pool.launch(r,currentServer,counter) do |_r,_currentServer,_counter|
+      $LOG.info("Moving region " + _r.getRegionNameAsString() + " (" + (_counter + 1).to_s
+
         " of " + regions.length.to_s + ") from " + _currentServer.to_s + " to server=" +
         servername);      
       move(admin, _r, servername, _currentServer)


Mime
View raw message