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

Datanode failed volume threshold ignored if exception is thrown in getDataDirsFromURIs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.3.0
    • datanode
    • None
    • Reviewed

    Description

      Saw a stacktrace of datanode startup with a bad volume, where even listing directories would throw an IOException. The failed volume threshold was set to 1, but it would fatally error out in File#getCanonicalPath in getDataDirsFromURIs:

            File dir = new File(dirURI.getPath());
            try {
              dataNodeDiskChecker.checkDir(localFS, new Path(dir.toURI()));
              dirs.add(dir);
            } catch (IOException ioe) {
              LOG.warn("Invalid " + DFS_DATANODE_DATA_DIR_KEY + " "
                  + dir + " : ", ioe);
              invalidDirs.append("\"").append(dir.getCanonicalPath()).append("\" ");
            }
      

      Since getCanonicalPath can need to do I/O and thus throw an IOException, this catch clause doesn't properly protect startup from a failed volume.

      Attachments

        1. HDFS-5458-1.patch
          0.9 kB
          Mike Mellenthin

        Activity

          People

            mike.mellenthin Mike Mellenthin
            andrew.wang Andrew Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: