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

Handle ArrayIndexOutOfBoundsException in DataNodeDiskMetrics#slowDiskDetectionDaemon

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0, 3.2.1, 3.1.4
    • Component/s: None
    • Labels:
      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. exception.png
          25 kB
          Surendra Singh Lilhore
        2. NPE.png
          10 kB
          Surendra Singh Lilhore
        3. HDFS-14235.000.patch
          3 kB
          Ranith Sardar
        4. HDFS-14235.001.patch
          5 kB
          Ranith Sardar
        5. HDFS-14235.002.patch
          5 kB
          Ranith Sardar
        6. HDFS-14235.003.patch
          5 kB
          Ranith Sardar

          Issue Links

            Activity

              People

              • Assignee:
                RANith Ranith Sardar
                Reporter:
                surendrasingh Surendra Singh Lilhore
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: