Dmitriy Fingerman created HIVE-28786:
----------------------------------------
Summary: Fix InetSocketAddress usage
Key: HIVE-28786
URL: https://issues.apache.org/jira/browse/HIVE-28786
Project: Hive
Issue Type: Sub-task
Reporter: Dmitriy Fingerman
Hive makes use of
{code:java}
InetSocketAddress(host, portNumber){code}
and
{code:java}
InetSocketAddress(portNumber){code}
Internally *InetSocketAddress* calls *InetAddress.getByName(hostname)* which
has issues with IPv6 (see another subtask).
Fix: Use InetAddress explicitly to support both IPv4 and IPv6.
// Bad
{code:java}
InetSocketAddress addr = new InetSocketAddress("2001:db8::1", 8080);{code}
// Good
{code:java}
InetAddress inetAddr = InetAddress.getByName("2001:db8::1");
InetSocketAddress addr = new InetSocketAddress(inetAddr, 8080);{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)