apache/hadoop · error · IOException

exceptions.toString()

Error message

exceptions.toString()

What it means

Thrown by FileUtil.copy after a multi-file copy loop: individual per-source IOExceptions were caught and accumulated, and at least one occurred. The aggregated messages (exceptions.toString()) form the final error text.

Solutions

  1. Inspect each exception in the list to find which file operations failed.
  2. Check permissions and existence for each source/destination involved in the copy.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java:408 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/d4370e66dc1a467f. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java:408

                              dst + "' is not a directory");
    } catch (FileNotFoundException e) {
      throw new IOException(
          "`" + dst + "': specified destination directory " +
              "does not exist", e);
    }

    for (Path src : srcs) {
      try {
        if (!copy(srcFS, src, dstFS, dst, deleteSource, overwrite, conf))
          returnVal = false;
      } catch (IOException e) {
        gotException = true;
        exceptions.append(e.getMessage())
            .append("\n");
      }
    }
    if (gotException) {
      throw new IOException(exceptions.toString());
    }
    return returnVal;
  }

  /**
   * Copy files between FileSystems.
   *
   * @param srcFS srcFs.
   * @param src src.
   * @param dstFS dstFs.
   * @param dst dst.
   * @param deleteSource delete source.
   * @param overwrite overwrite.
   * @param conf configuration.
   * @throws IOException raised on errors performing I/O.
   * @return true if the operation succeeded.
   */
  public static boolean copy(FileSystem srcFS, Path src,

View on GitHub (pinned to 2add963021)