HBASE-14258 Addendum fixes case sensitivity in 'load' (Vladimir Rodionov)

This commit is contained in:
tedyu 2015-08-29 02:10:46 -07:00
parent 0d06d8ddd0
commit 4256128fa2
1 changed files with 3 additions and 1 deletions

View File

@ -247,9 +247,11 @@ end
# Return servername that matches passed hostname and port # Return servername that matches passed hostname and port
def getServerName(servers, hostname, port) def getServerName(servers, hostname, port)
servername = nil servername = nil
upperCaseHostname = hostname.upcase;
for server in servers for server in servers
hostFromServerName, portFromServerName = getHostPortFromServerName(server) hostFromServerName, portFromServerName = getHostPortFromServerName(server)
if hostFromServerName == hostname and portFromServerName == port hostFromServerName = hostFromServerName.upcase
if hostFromServerName == upperCaseHostname and portFromServerName == port
servername = server servername = server
break break
end end