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

DirectoryCollection#createNonExistentDirs() may use an invalid iterator

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: