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:39:53 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 58e94d034 -> c86f8fb78


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

Branch: refs/heads/0.98
Commit: c86f8fb787a8c2d4d58b740c822130879050ccfe
Parents: 58e94d0
Author: stack <stack@apache.org>
Authored: Sat Dec 27 10:37:40 2014 -0800
Committer: stack <stack@apache.org>
Committed: Sat Dec 27 10:39:32 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/c86f8fb7/bin/region_mover.rb
----------------------------------------------------------------------
diff --git a/bin/region_mover.rb b/bin/region_mover.rb
index fa39f04..2ee4bcd 100644
--- a/bin/region_mover.rb
+++ b/bin/region_mover.rb
@@ -346,7 +346,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
@@ -400,7 +399,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
@@ -417,13 +415,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