apache/hadoop · error · FileNotFoundException
${fileName} not found.
Error message
${fileName} not found. What it means
Error "${fileName} not found." thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HardLink.java:244
LOG.warn("Failed to determine if hardlink is supported", e);
return false;
}
}
/**
* Retrieves the number of links to the specified file.
*
* @param fileName file name.
* @throws IOException raised on errors performing I/O.
* @return link count.
*/
public static int getLinkCount(File fileName) throws IOException {
if (fileName == null) {
throw new IOException(
"invalid argument to getLinkCount: file name is null");
}
if (!fileName.exists()) {
throw new FileNotFoundException(fileName + " not found.");
}
if (supportsHardLink(fileName)) {
return (int) Files.getAttribute(fileName.toPath(), FILE_ATTRIBUTE);
}
// construct and execute shell command
String[] cmd = getHardLinkCommand.linkCount(fileName);
String inpMsg = null;
String errMsg = null;
int exitValue = -1;
BufferedReader in = null;
ShellCommandExecutor shexec = new ShellCommandExecutor(cmd);
try {
shexec.execute();
in = new BufferedReader(new StringReader(shexec.getOutput()));
inpMsg = in.readLine();View on GitHub (pinned to 2add963021)
Solutions
- Verify ${fileName} exists before calling getLinkCount.
- Check for path typos or a race with file deletion.
When it happens
Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HardLink.java:244 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/b80dd6651f981de0.
Report an issue: GitHub.