You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Surendra Singh Lilhore (JIRA)" <ji...@apache.org> on 2019/01/28 08:59:00 UTC

[jira] [Created] (HDFS-14235) Handle ArrayIndexOutOfBoundsException in DataNodeDiskMetrics#slowDiskDetectionDaemon

Surendra Singh Lilhore created HDFS-14235:
---------------------------------------------

             Summary: 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


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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org