apache/hadoop · error · FileNotFoundException

${linkDir} not found.

Error message

${linkDir} not found.

What it means

Error "${linkDir} not found." thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HardLink.java:208

   * @throws IOException raised on errors performing I/O.
   */
  public static void createHardLinkMult(File parentDir, String[] fileBaseNames,
      File linkDir) throws IOException {
    if (parentDir == null) {
      throw new IOException(
          "invalid arguments to createHardLinkMult: parent directory is null");
    }
    if (linkDir == null) {
      throw new IOException(
          "invalid arguments to createHardLinkMult: link directory is null");
    }
    if (fileBaseNames == null) {
      throw new IOException(
          "invalid arguments to createHardLinkMult: "
          + "filename list can be empty but not null");
    }
    if (!linkDir.exists()) {
      throw new FileNotFoundException(linkDir + " not found.");
    }
    for (String name : fileBaseNames) {
      createLink(linkDir.toPath().resolve(name),
                 parentDir.toPath().resolve(name));
    }
  }

    /**
     * Determines whether the system supports hardlinks.
     * @param f - file to examine
     * @return true if hardlinks are supported, false otherwise
     */
  public static boolean supportsHardLink(File f) {
    try {
      FileStore store = Files.getFileStore(f.toPath());
      return store.supportsFileAttributeView(FILE_ATTRIBUTE_VIEW);
    } catch (IOException e) {
      LOG.warn("Failed to determine if hardlink is supported", e);

View on GitHub (pinned to 2add963021)

Solutions

  1. Create the link directory before creating hard links into it.
  2. Verify the ${linkDir} path spelling.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HardLink.java:208 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/6478e7313aede277. Report an issue: GitHub.