Github user nyaapa commented on the pull request:
https://github.com/apache/spark/pull/5424#issuecomment-91691240
```InetAddresses.toUriString``` is ```(InetAddress) => String```, maybe you
meant ```forUriString(String) => InetAddress``` or ```forString(String) =>
InetAddress``` ?
for ```forUriString```
```
scala> val ipv6 =
InetAddress.getByAddress(NetworkInterface.getNetworkInterfaces.toList.apply(0).getInetAddresses.toList.apply(0).getAddress).getHostAddress
ipv6: String = fe80:0:0:0:3623:87ff:fe6a:423c
scala> InetAddresses.forUriString(ipv6)
java.lang.IllegalArgumentException: Not a valid URI IP literal:
'fe80:0:0:0:3623:87ff:fe6a:423c'
at
com.google.common.net.InetAddresses.forUriString(InetAddresses.java:501)
... 33 elided
```
And for ```forString``` i still need ```InetAddresses.toUriString```
```
scala> val ipv6 =
InetAddress.getByAddress(NetworkInterface.getNetworkInterfaces.toList.apply(0).getInetAddresses.toList.apply(0).getAddress).getHostAddress
ipv6: String = fe80:0:0:0:3623:87ff:fe6a:423c
scala> InetAddresses.forString(ipv6).getHostName
res35: String = fe80:0:0:0:3623:87ff:fe6a:423c
scala> InetAddresses.forString(ipv6).getHostAddress
res36: String = fe80:0:0:0:3623:87ff:fe6a:423c
scala> InetAddresses.toUriString(InetAddresses.forString(ipv6))
res37: String = [fe80::3623:87ff:fe6a:423c]
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]