[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-07-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HADOOP-17542:

Labels: ipv6 pull-request-available  (was: ipv6)

> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6, pull-request-available
> Attachments: HADOOP-17542-HADOOP-11890-001.patch, Test Scenarios 
> Verified in IPV6 cluster.doc
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. 
> If target is IPV6 ip then it throw "Does not contain a valid host:port 
> authority: ".
> This need be support.
> public static InetSocketAddress createSocketAddr(String target,
>  int defaultPort,
>  String configName,
>  boolean useCacheIfPresent) {
>  String helpText = "";
>  if (configName != null)
> { helpText = " (configuration property '" + configName + "')"; }
> if (target == null)
> { throw new IllegalArgumentException("Target address cannot be null." + 
> helpText); }
> target = target.trim();
>  boolean hasScheme = target.contains("://");
>  URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);
> String host = uri.getHost();
>  int port = uri.getPort();
>  if (port == -1)
> { port = defaultPort; }
> String path = uri.getPath();
> if ((host == null) || (port < 0) ||
>  (!hasScheme && path != null && !path.isEmpty()))
> { throw new IllegalArgumentException( *"Does not contain a valid host:port 
> authority: " + target + helpText* ); }
> return createSocketAddrForHost(host, port);
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-05-12 Thread Wei-Chiu Chuang (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei-Chiu Chuang updated HADOOP-17542:
-
Target Version/s: 3.3.2  (was: 3.3.1)

> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6
> Attachments: HADOOP-17542-HADOOP-11890-001.patch, Test Scenarios 
> Verified in IPV6 cluster.doc
>
>
> Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. 
> If target is IPV6 ip then it throw "Does not contain a valid host:port 
> authority: ".
> This need be support.
> public static InetSocketAddress createSocketAddr(String target,
>  int defaultPort,
>  String configName,
>  boolean useCacheIfPresent) {
>  String helpText = "";
>  if (configName != null)
> { helpText = " (configuration property '" + configName + "')"; }
> if (target == null)
> { throw new IllegalArgumentException("Target address cannot be null." + 
> helpText); }
> target = target.trim();
>  boolean hasScheme = target.contains("://");
>  URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);
> String host = uri.getHost();
>  int port = uri.getPort();
>  if (port == -1)
> { port = defaultPort; }
> String path = uri.getPath();
> if ((host == null) || (port < 0) ||
>  (!hasScheme && path != null && !path.isEmpty()))
> { throw new IllegalArgumentException( *"Does not contain a valid host:port 
> authority: " + target + helpText* ); }
> return createSocketAddrForHost(host, port);
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-03-02 Thread ANANDA G B (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ANANDA G B updated HADOOP-17542:

Attachment: Test Scenarios Verified in IPV6 cluster.doc

> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6
> Attachments: HADOOP-17542-HADOOP-11890-001.patch, Test Scenarios 
> Verified in IPV6 cluster.doc
>
>
> Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. 
> If target is IPV6 ip then it throw "Does not contain a valid host:port 
> authority: ".
> This need be support.
> public static InetSocketAddress createSocketAddr(String target,
>  int defaultPort,
>  String configName,
>  boolean useCacheIfPresent) {
>  String helpText = "";
>  if (configName != null)
> { helpText = " (configuration property '" + configName + "')"; }
> if (target == null)
> { throw new IllegalArgumentException("Target address cannot be null." + 
> helpText); }
> target = target.trim();
>  boolean hasScheme = target.contains("://");
>  URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);
> String host = uri.getHost();
>  int port = uri.getPort();
>  if (port == -1)
> { port = defaultPort; }
> String path = uri.getPath();
> if ((host == null) || (port < 0) ||
>  (!hasScheme && path != null && !path.isEmpty()))
> { throw new IllegalArgumentException( *"Does not contain a valid host:port 
> authority: " + target + helpText* ); }
> return createSocketAddrForHost(host, port);
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-02-25 Thread ANANDA G B (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ANANDA G B updated HADOOP-17542:

Description: 
Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. If 
target is IPV6 ip then it throw "Does not contain a valid host:port authority: 
".

This need be support.

public static InetSocketAddress createSocketAddr(String target,
 int defaultPort,
 String configName,
 boolean useCacheIfPresent) {
 String helpText = "";
 if (configName != null)

{ helpText = " (configuration property '" + configName + "')"; }

if (target == null)

{ throw new IllegalArgumentException("Target address cannot be null." + 
helpText); }

target = target.trim();
 boolean hasScheme = target.contains("://");
 URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);

String host = uri.getHost();
 int port = uri.getPort();
 if (port == -1)

{ port = defaultPort; }

String path = uri.getPath();

if ((host == null) || (port < 0) ||
 (!hasScheme && path != null && !path.isEmpty()))

{ throw new IllegalArgumentException( *"Does not contain a valid host:port 
authority: " + target + helpText* ); }

return createSocketAddrForHost(host, port);
 }

  was:
Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. If 
target is IPV6 ip then it throw "Does not contain a valid host:port authority: 
".

This need be support.

 public static InetSocketAddress createSocketAddr(String target,
 int defaultPort,
 String configName,
 boolean useCacheIfPresent) {
 String helpText = "";
 if (configName != null)

{ helpText = " (configuration property '" + configName + "')"; }

if (target == null)

{ throw new IllegalArgumentException("Target address cannot be null." + 
helpText); }

target = target.trim();
 boolean hasScheme = target.contains("://");
 URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);

String host = uri.getHost();
 int port = uri.getPort();
 if (port == -1)

{ port = defaultPort; }

String path = uri.getPath();

if ((host == null) || (port < 0) ||
 (!hasScheme && path != null && !path.isEmpty()))

{ throw new IllegalArgumentException( *"Does not contain a valid host:port 
authority: " + target + helpText* ); }

return createSocketAddrForHost(host, port);
 } 


> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6
> Attachments: HADOOP-17542-HADOOP-11890-001.patch
>
>
> Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. 
> If target is IPV6 ip then it throw "Does not contain a valid host:port 
> authority: ".
> This need be support.
> public static InetSocketAddress createSocketAddr(String target,
>  int defaultPort,
>  String configName,
>  boolean useCacheIfPresent) {
>  String helpText = "";
>  if (configName != null)
> { helpText = " (configuration property '" + configName + "')"; }
> if (target == null)
> { throw new IllegalArgumentException("Target address cannot be null." + 
> helpText); }
> target = target.trim();
>  boolean hasScheme = target.contains("://");
>  URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);
> String host = uri.getHost();
>  int port = uri.getPort();
>  if (port == -1)
> { port = defaultPort; }
> String path = uri.getPath();
> if ((host == null) || (port < 0) ||
>  (!hasScheme && path != null && !path.isEmpty()))
> { throw new IllegalArgumentException( *"Does not contain a valid host:port 
> authority: " + target + helpText* ); }
> return createSocketAddrForHost(host, port);
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-02-25 Thread ANANDA G B (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ANANDA G B updated HADOOP-17542:

Description: 
Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. If 
target is IPV6 ip then it throw "Does not contain a valid host:port authority: 
".

This need be support.

 public static InetSocketAddress createSocketAddr(String target,
 int defaultPort,
 String configName,
 boolean useCacheIfPresent) {
 String helpText = "";
 if (configName != null)

{ helpText = " (configuration property '" + configName + "')"; }

if (target == null)

{ throw new IllegalArgumentException("Target address cannot be null." + 
helpText); }

target = target.trim();
 boolean hasScheme = target.contains("://");
 URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);

String host = uri.getHost();
 int port = uri.getPort();
 if (port == -1)

{ port = defaultPort; }

String path = uri.getPath();

if ((host == null) || (port < 0) ||
 (!hasScheme && path != null && !path.isEmpty()))

{ throw new IllegalArgumentException( *"Does not contain a valid host:port 
authority: " + target + helpText* ); }

return createSocketAddrForHost(host, port);
 } 

  was:
Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. If 
target is IPV6 ip then it throw "Does not contain a valid host:port authority: 
".

This need be support.

public static InetSocketAddress createSocketAddr(String target,
 int defaultPort,
 String configName,
 boolean useCacheIfPresent) {
 String helpText = "";
 if (configName != null) {
 helpText = " (configuration property '" + configName + "')";
 }
 if (target == null) {
 throw new IllegalArgumentException("Target address cannot be null." +
 helpText);
 }
 target = target.trim();
 boolean hasScheme = target.contains("://");
 URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);

String host = uri.getHost();
 int port = uri.getPort();
 if (port == -1) {
 port = defaultPort;
 }
 String path = uri.getPath();

if ((host == null) || (port < 0) ||
 (!hasScheme && path != null && !path.isEmpty())) {
 throw new IllegalArgumentException(
 "Does not contain a valid host:port authority: " + target + helpText
 );
 }
 return createSocketAddrForHost(host, port);
 }


> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6
> Attachments: HADOOP-17542-HADOOP-11890-001.patch
>
>
> Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. 
> If target is IPV6 ip then it throw "Does not contain a valid host:port 
> authority: ".
> This need be support.
>  public static InetSocketAddress createSocketAddr(String target,
>  int defaultPort,
>  String configName,
>  boolean useCacheIfPresent) {
>  String helpText = "";
>  if (configName != null)
> { helpText = " (configuration property '" + configName + "')"; }
> if (target == null)
> { throw new IllegalArgumentException("Target address cannot be null." + 
> helpText); }
> target = target.trim();
>  boolean hasScheme = target.contains("://");
>  URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);
> String host = uri.getHost();
>  int port = uri.getPort();
>  if (port == -1)
> { port = defaultPort; }
> String path = uri.getPath();
> if ((host == null) || (port < 0) ||
>  (!hasScheme && path != null && !path.isEmpty()))
> { throw new IllegalArgumentException( *"Does not contain a valid host:port 
> authority: " + target + helpText* ); }
> return createSocketAddrForHost(host, port);
>  } 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-02-25 Thread ANANDA G B (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ANANDA G B updated HADOOP-17542:

Description: 
Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. If 
target is IPV6 ip then it throw "Does not contain a valid host:port authority: 
".

This need be support.

public static InetSocketAddress createSocketAddr(String target,
 int defaultPort,
 String configName,
 boolean useCacheIfPresent) {
 String helpText = "";
 if (configName != null) {
 helpText = " (configuration property '" + configName + "')";
 }
 if (target == null) {
 throw new IllegalArgumentException("Target address cannot be null." +
 helpText);
 }
 target = target.trim();
 boolean hasScheme = target.contains("://");
 URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);

String host = uri.getHost();
 int port = uri.getPort();
 if (port == -1) {
 port = defaultPort;
 }
 String path = uri.getPath();

if ((host == null) || (port < 0) ||
 (!hasScheme && path != null && !path.isEmpty())) {
 throw new IllegalArgumentException(
 "Does not contain a valid host:port authority: " + target + helpText
 );
 }
 return createSocketAddrForHost(host, port);
 }

> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6
> Attachments: HADOOP-17542-HADOOP-11890-001.patch
>
>
> Currently NetUtils#createSocketAddress not supporting if target is IPV6 ip. 
> If target is IPV6 ip then it throw "Does not contain a valid host:port 
> authority: ".
> This need be support.
> public static InetSocketAddress createSocketAddr(String target,
>  int defaultPort,
>  String configName,
>  boolean useCacheIfPresent) {
>  String helpText = "";
>  if (configName != null) {
>  helpText = " (configuration property '" + configName + "')";
>  }
>  if (target == null) {
>  throw new IllegalArgumentException("Target address cannot be null." +
>  helpText);
>  }
>  target = target.trim();
>  boolean hasScheme = target.contains("://");
>  URI uri = createURI(target, hasScheme, helpText, useCacheIfPresent);
> String host = uri.getHost();
>  int port = uri.getPort();
>  if (port == -1) {
>  port = defaultPort;
>  }
>  String path = uri.getPath();
> if ((host == null) || (port < 0) ||
>  (!hasScheme && path != null && !path.isEmpty())) {
>  throw new IllegalArgumentException(
>  "Does not contain a valid host:port authority: " + target + helpText
>  );
>  }
>  return createSocketAddrForHost(host, port);
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17542) IPV6 support in Netutils#createSocketAddress

2021-02-25 Thread ANANDA G B (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-17542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ANANDA G B updated HADOOP-17542:

Summary: IPV6 support in Netutils#createSocketAddress   (was: Avoid unsafe 
split and append on fields that might be IPv6 literals)

> IPV6 support in Netutils#createSocketAddress 
> -
>
> Key: HADOOP-17542
> URL: https://issues.apache.org/jira/browse/HADOOP-17542
> Project: Hadoop Common
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: ANANDA G B
>Priority: Minor
>  Labels: ipv6
> Attachments: HADOOP-17542-HADOOP-11890-001.patch
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org