HBASE-16377 ServerName check is ineffective in region_mover.rb
This commit is contained in:
parent
441bc050b9
commit
cebba7b4d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue