HBASE-14258 Make region_mover.rb script case insensitive with regard to hostname (Vladimir Rodionov)

This commit is contained in:
tedyu 2015-08-25 16:36:39 -07:00
parent 3dacee674c
commit 506726ed28
1 changed files with 3 additions and 1 deletions

View File

@ -201,11 +201,13 @@ end
# Remove the servername whose hostname portion matches from the passed
# array of servers. Returns as side-effect the servername removed.
def stripServer(servers, hostname, port)
upperCaseHostname = hostname.upcase;
count = servers.length
servername = nil
for server in servers
hostFromServerName, portFromServerName = getHostPortFromServerName(server)
if hostFromServerName == hostname and portFromServerName == port
hostFromServerName = hostFromServerName.upcase
if hostFromServerName == upperCaseHostname and portFromServerName == port
servername = servers.delete(server)
end
end