hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/4] hbase git commit: HBASE-16377 ServerName check is ineffective in region_mover.rb
Date Thu, 25 Aug 2016 01:12:21 GMT
HBASE-16377 ServerName check is ineffective in region_mover.rb


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

Branch: refs/heads/0.98
Commit: 62690dfba8b6f799ca26adde8a6dd4a8ff9cd0bd
Parents: 5987620
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Aug 9 18:21:18 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Aug 24 17:53:51 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/62690dfb/bin/region_mover.rb
----------------------------------------------------------------------
diff --git a/bin/region_mover.rb b/bin/region_mover.rb
index 91bfd93..a734ccb 100644
--- a/bin/region_mover.rb
+++ b/bin/region_mover.rb
@@ -73,7 +73,7 @@ def getServerNameForRegion(admin, r)
         sleep 0.1
       end
       # Make a fake servername by appending ','
-      metaServer = tracker.getMetaRegionLocation().toString() + ","
+      metaServer = (tracker.getMetaRegionLocation().toString() + ",").to_s
       tracker.stop()
       return metaServer
     ensure
@@ -385,7 +385,7 @@ def loadRegions(options, hostname, port)
     end
     next unless exists
     currentServer = getServerNameForRegion(admin, r)
-    if currentServer and currentServer == servername
+    if currentServer and servername and currentServer == servername.to_s
       $LOG.info("Region " + r.getRegionNameAsString() + " (" + counter.to_s +
         " of " + regions.length.to_s + ") already on target server=" + servername)
       counter = counter + 1


Mime
View raw message