-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-17834. Fix invalid HTTP links for DataNodes in IPv6 environment #8081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🎊 +1 overall
This message was automatically generated. |
|
@mynameis180 Since this changes some pages, could you share a few screenshots? |
Hexiaoqiao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, leave one nit comment inline. FYI.
| var port = n.infoAddr.split(":")[1]; | ||
| var securePort = n.infoSecureAddr.split(":")[1]; | ||
| var infoAddrParts = n.infoAddr.split("]:"); | ||
| var port = "9864"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This static value should be not necessary here. It is better to correct it include the following same definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,I will remove duplicate variable declaration - The original code declared port twice
remove the hardcoded "9864" assignment as requested
53a90bd to
fbbb43e
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
@Hexiaoqiao please review again |
Hexiaoqiao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. +1.
|
Committed to branch-3.4. Thanks @mynameis180 for your contribution and @slfan1989 for your reviews. |
|
@mynameis180 How about to submit another PR to trunk? |
ok |

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:
[]as required by RFC 2732Solution
Example
Before:
https://datanodeHostname:30(invalid)After:
https://[1172:30:0:0:0:0:8a34]:50010(valid)How was this patch tested?
For code changes:
Note: This PR only contains code changes and no new dependencies were added.