mynameis180 opened a new pull request, #8080:
URL: https://github.com/apache/hadoop/pull/8080

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ## Description of PR
   
   This PR fixes HDFS-17834: HDFS NameNode Web UI generates invalid HTTP links 
for DataNodes in IPv6 environment.
   
   ### Problem
   The NameNode Web UI incorrectly handles IPv6 addresses in DataNode links:
   1. Fails to encapsulate IPv6 addresses in square brackets `[]` as required 
by RFC 2732
   2. Incorrectly parses IPv6 addresses, mistaking parts of the address for 
port numbers
   3. Generates malformed, unclickable links that don't point to the DataNode's 
web interface
   
   ### Solution
   - Properly wrap IPv6 addresses in square brackets for URL construction
   - Fix the address parsing logic to correctly separate IPv6 addresses from 
port numbers
   - Ensure generated links follow RFC 2732 standards for IPv6 literal 
addresses in URLs
   
   ### Example
   Before: `https://datanodeHostname:30` (invalid)
   After: `https://[1172:30:0:0:0:0:8a34]:50010` (valid)
   
   ## How was this patch tested?
   
   - [x] Added unit tests for IPv6 address formatting in URL generation
   - [x] Tested with existing IPv4 addresses to ensure no regression
   - [x] Manual testing with IPv6 DataNode configurations
   - [x] Verified generated links are clickable and point to correct DataNode 
web interfaces
   
   ## For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id?
   - [x] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under ASF 2.0?
   - [x] If applicable, have you updated the LICENSE, LICENSE-binary, 
NOTICE-binary files?
   
   **Note:** This PR only contains code changes and no new dependencies were 
added.
   


-- 
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]

Reply via email to