Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12056

Use DirectoryStream in DiskChecker#checkDirs to detect errors when listing a directory

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: util
    • Labels:
      None

      Description

      DiskChecker#checkDirs should check null pointer for the return value from File#listFiles. Based on the document for File#listFiles at https://docs.oracle.com/javase/7/docs/api/java/io/File.html#listFiles() :

      Returns null if an I/O error occurs.
      

      So it will be good to check null pointer and throw DiskErrorException if it is null.

        Attachments

        1. HADOOP-12056.003.patch
          3 kB
          zhihai xu
        2. HADOOP-12056.002.patch
          3 kB
          zhihai xu
        3. HADOOP-12056.001.patch
          2 kB
          zhihai xu
        4. HADOOP-12056.000.patch
          2 kB
          zhihai xu

          Activity

            People

            • Assignee:
              zxu zhihai xu
              Reporter:
              zxu zhihai xu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: