[ https://issues.apache.org/jira/browse/HDFS-14240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757595#comment-16757595 ]
Masatake Iwasaki commented on HDFS-14240: ----------------------------------------- {quote}roblem is here:array datanodes's length is determined by args as "-datanodes" or "-threads" ,but dnIdx = dnInfo.getXferPort() is a random port. {quote} NNThroughputBenchmark registers fake datanode having port number based on idx if using in-process NameNode. The code path assuming the mode seems to be reached in the mode using real NameNode. [~shenyinjie] if you can show the command line to reproduce the issue, it would be help. [~RANith] I assigned you to this ticket. > blockReport test in NNThroughputBenchmark throws > ArrayIndexOutOfBoundsException > ------------------------------------------------------------------------------- > > Key: HDFS-14240 > URL: https://issues.apache.org/jira/browse/HDFS-14240 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Shen Yinjie > Assignee: Ranith Sardar > Priority: Major > Attachments: screenshot-1.png > > > When I run a blockReport test with NNThroughputBenchmark, > BlockReportStats.addBlocks() throws ArrayIndexOutOfBoundsException. > digging the code: > {code:java} > for(DatanodeInfo dnInfo : loc.getLocations()) > { int dnIdx = dnInfo.getXferPort() - 1; > datanodes[dnIdx].addBlock(loc.getBlock().getLocalBlock());{code} > > problem is here:array datanodes's length is determined by args as > "-datanodes" or "-threads" ,but dnIdx = dnInfo.getXferPort() is a random port. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org