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:37:11 -07:00
parent c127577862
commit 9b55f1cd29
1 changed files with 3 additions and 1 deletions

View File

@ -180,11 +180,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