nrg4878 opened a new pull request, #4263: URL: https://github.com/apache/hive/pull/4263
### What changes were proposed in this pull request? In MetastoreServerUtils.checkUserHasHostProxyPrivileges(), the check is to see if hadoop.proxyuser* settings in core-site.xml allow this user to execute this. One of the arguments to this method is an IpAddress that it is being executed on, which is fetched from HMSHandler.getIpAddress(). However, when running schematool, this is never is set during initialization. In this case, because it is not HMS server, the SaslServer is not initialized. When the core-site.xml has CIDR configurations, SubnetInfo.inRange() check throws an exception when the ip we are checking on in EMPTY. So in case of schematool, try to use the hostaddress before resorting to empty ip address. ### Why are the changes needed? HIVE-27289. To avoid exception during upgrades. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Manually. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
