diff --git a/bin/region_mover.rb b/bin/region_mover.rb index 3231cabb65d..64709d7ed56 100644 --- a/bin/region_mover.rb +++ b/bin/region_mover.rb @@ -72,7 +72,7 @@ def getServerNameForRegion(admin, r) sleep 0.1 end # Make a fake servername by appending ',' - metaServer = mtl.getMetaRegionLocation(zkw).toString() + "," + metaServer = (mtl.getMetaRegionLocation(zkw).toString() + ",").to_s return metaServer ensure zkw.close() @@ -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