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

Jing Zhao commented on HDFS-4204:
---------------------------------

The empty string passed here should be fine, since in trunk for the same test 
the string passed is also an empty string. In general the invocation of 
NetUtils#normalizeHostName with an empty string happens in this scenario: 
OpenFileStats#executeOp --> NameNode#getBlockLocations --> 
FSNamesystem#getBlockLocations --> CachedDNSToSwitchMapping#resolve --> 
NetUtils#normalizeHostNames --> NetUtils.normalizeHostName. Based on Junping's 
comments, I think we can simply backport HADOOP-8372 to fix the error.
                
> TestNNThroughputBenchmark fails in branch-1
> -------------------------------------------
>
>                 Key: HDFS-4204
>                 URL: https://issues.apache.org/jira/browse/HDFS-4204
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Tsz Wo (Nicholas), SZE
>         Attachments: HDFS-4204.b1.001.patch
>
>
> {noformat}
> java.lang.StringIndexOutOfBoundsException: String index out of range: 0
>     at java.lang.String.charAt(String.java:686)
>     at org.apache.hadoop.net.NetUtils.normalizeHostName(NetUtils.java:539)
>     at org.apache.hadoop.net.NetUtils.normalizeHostNames(NetUtils.java:562)
>     at 
> org.apache.hadoop.net.CachedDNSToSwitchMapping.resolve(CachedDNSToSwitchMapping.java:88)
>     at 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockLocations(FSNamesystem.java:1047)
>     ...
>     at 
> org.apache.hadoop.hdfs.server.namenode.NNThroughputBenchmark$StatsDaemon.run(NNThroughputBenchmark.java:377)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to