[ 
https://issues.apache.org/jira/browse/HDFS-17629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885555#comment-17885555
 ] 

ASF GitHub Bot commented on HDFS-17629:
---------------------------------------

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

   …nment.
   
   ### Description of PR
   
   for https://issues.apache.org/jira/browse/HDFS-17629
   
   unction open_hostip_list in histogram-hostip.js , here is root  reason
   
   ```js
   if (index > x0 && index <= x1) {
         ips.push(dn.infoAddr.split(":")[0]);
   } 
   ```
   need change to:
   
   ```js
   if (index > x0 && index <= x1) {
          ips.push(dn.infoAddr.split(":")[0]);
          var idx = dn.infoAddr.lastIndexOf(":"); 
          var dnIp = dn.infoAddr.substring(0, idx);
          ips.push(dnIp);   
   }
   ```
   
   ### How was this patch tested?
   
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> The IP address is incorrectly displayed in the IPv6 environment.
> ----------------------------------------------------------------
>
>                 Key: HDFS-17629
>                 URL: https://issues.apache.org/jira/browse/HDFS-17629
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: zeekling
>            Priority: Major
>         Attachments: image-2024-09-23-09-22-28-495.png
>
>
>  
> !image-2024-09-23-09-22-28-495.png!
>  
> function open_hostip_list in histogram-hostip.js , here is root  reason
> {code:java}
> if (index > x0 && index <= x1) {
>       ips.push(dn.infoAddr.split(":")[0]);
> } {code}
> need change to:
> {code:java}
> if (index > x0 && index <= x1) {
>        ips.push(dn.infoAddr.split(":")[0]);
>        var idx = dn.infoAddr.lastIndexOf(":"); 
>        var dnIp = dn.infoAddr.substring(0, idx);
>        ips.push(dnIp);   
> }{code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to