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
|
sleep 0.1
|
||||||
end
|
end
|
||||||
# Make a fake servername by appending ','
|
# Make a fake servername by appending ','
|
||||||
metaServer = mtl.getMetaRegionLocation(zkw).toString() + ","
|
metaServer = (mtl.getMetaRegionLocation(zkw).toString() + ",").to_s
|
||||||
return metaServer
|
return metaServer
|
||||||
ensure
|
ensure
|
||||||
zkw.close()
|
zkw.close()
|
||||||
|
@ -385,7 +385,7 @@ def loadRegions(options, hostname, port)
|
||||||
end
|
end
|
||||||
next unless exists
|
next unless exists
|
||||||
currentServer = getServerNameForRegion(admin, r)
|
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 +
|
$LOG.info("Region " + r.getRegionNameAsString() + " (" + counter.to_s +
|
||||||
" of " + regions.length.to_s + ") already on target server=" + servername)
|
" of " + regions.length.to_s + ") already on target server=" + servername)
|
||||||
counter = counter + 1
|
counter = counter + 1
|
||||||
|
|
Loading…
Reference in New Issue