Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14235

Handle ArrayIndexOutOfBoundsException in DataNodeDiskMetrics#slowDiskDetectionDaemon

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, 3.2.1, 3.1.4
    • None
    • None

    Description

      below code throwing exception because volumeIterator.next() called two time without checking hashNext().

      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());
      }

      Attachments

        1. NPE.png
          10 kB
          Surendra Singh Lilhore
        2. HDFS-14235.003.patch
          5 kB
          Ranith Sardar
        3. HDFS-14235.002.patch
          5 kB
          Ranith Sardar
        4. HDFS-14235.001.patch
          5 kB
          Ranith Sardar
        5. HDFS-14235.000.patch
          3 kB
          Ranith Sardar
        6. exception.png
          25 kB
          Surendra Singh Lilhore

        Issue Links

          Activity

            People

              RANith Ranith Sardar
              surendralilhore Surendra Singh Lilhore
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: