Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5739

DirectoryCollection#createNonExistentDirs() may use an invalid iterator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Here is related code:

          for (final String dir : localDirs) {
            try {
              createDir(localFs, new Path(dir), perm);
            } catch (IOException e) {
              LOG.warn("Unable to create directory " + dir + " error " +
                  e.getMessage() + ", removing from the list of valid directories.");
              localDirs.remove(dir);
      

      Call to localDirs.remove() modifies Iterable "localDirs" which invalidates the iterator.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: