[ https://issues.apache.org/jira/browse/HDFS-14235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16941411#comment-16941411 ]
Wei-Chiu Chuang commented on HDFS-14235: ---------------------------------------- Commit applies cleanly in branch-3.1. Updated fix version > Handle ArrayIndexOutOfBoundsException in > DataNodeDiskMetrics#slowDiskDetectionDaemon > ------------------------------------------------------------------------------------- > > Key: HDFS-14235 > URL: https://issues.apache.org/jira/browse/HDFS-14235 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Surendra Singh Lilhore > Assignee: Ranith Sardar > Priority: Major > Fix For: 3.3.0, 3.2.1, 3.1.4 > > Attachments: HDFS-14235.000.patch, HDFS-14235.001.patch, > HDFS-14235.002.patch, HDFS-14235.003.patch, NPE.png, exception.png > > > below code throwing exception because {{volumeIterator.next()}} called two > time without checking hashNext(). > {code:java} > while (volumeIterator.hasNext()) { > FsVolumeSpi volume = volumeIterator.next(); > DataNodeVolumeMetrics metrics = volumeIterator.next().getMetrics(); > String volumeName = volume.getBaseURI().getPath(); > metadataOpStats.put(volumeName, > metrics.getMetadataOperationMean()); > readIoStats.put(volumeName, metrics.getReadIoMean()); > writeIoStats.put(volumeName, metrics.getWriteIoMean()); > }{code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org