Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5739

DirectoryCollection#createNonExistentDirs() may use an invalid iterator

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • 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.

        Activity

        Ted Yu created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development