Gargi-jais11 commented on code in PR #11619:
URL: https://github.com/apache/ozone/pull/11619#discussion_r4311738890
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerSubCommandUtil.java:
##########
@@ -168,14 +168,9 @@ public static DiskBalancerProtocol
getSingleNodeDiskBalancerProxy(
UserGroupInformation user = UserGroupInformation.getCurrentUser();
// Parse address and add default port if not specified
- InetSocketAddress nodeAddr;
- if (address.contains(":")) {
- // Port is specified, use NetUtils to parse
- nodeAddr = NetUtils.createSocketAddr(address);
- } else {
- // Port not specified, use default
- nodeAddr = NetUtils.createSocketAddr(address,
HDDS_DATANODE_CLIENT_PORT_DEFAULT);
- }
+ int port =
HddsUtils.getHostPort(address).orElse(HDDS_DATANODE_CLIENT_PORT_DEFAULT);
+ InetSocketAddress nodeAddr = NetUtils.createSocketAddr(
Review Comment:
A bare IPv6 literal followed by a port **(2001:db8::1:1234)** now parses as
host `2001:db8::1:1234` with the default port, instead of failing as before.
--
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]