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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0, 3.0.0-alpha1
    • util
    • 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.000.patch
          2 kB
          Zhihai Xu
        2. HADOOP-12056.001.patch
          2 kB
          Zhihai Xu
        3. HADOOP-12056.002.patch
          3 kB
          Zhihai Xu
        4. HADOOP-12056.003.patch
          3 kB
          Zhihai Xu

        Activity

          People

            zxu Zhihai Xu
            zxu Zhihai Xu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: