apache/hadoop · error · IllegalArgumentException
Must be exactly one fsimage file present in fs_image_dir
Error message
Must be exactly one fsimage file present in fs_image_dir
What it means
Error "Must be exactly one fsimage file present in fs_image_dir" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java:427
Joiner.on("\" \"").join(args));
Path fsImageDir = new Path(commandLine.getOptionValue(FS_IMAGE_DIR_ARG,
""));
versionFilePath = new Path(fsImageDir, "VERSION").toString();
if (commandLine.hasOption(NAMENODE_SERVICERPC_ADDR_ARG)) {
launchNameNode = false;
remoteNameNodeRpcAddress =
commandLine.getOptionValue(NAMENODE_SERVICERPC_ADDR_ARG);
} else {
launchNameNode = true;
FileSystem localFS = FileSystem.getLocal(getConf());
fsImageDir = fsImageDir.makeQualified(localFS.getUri(),
localFS.getWorkingDirectory());
FileSystem fsImageFS = fsImageDir.getFileSystem(getConf());
FileStatus[] fsImageFiles = fsImageFS.listStatus(fsImageDir,
(path) -> path.getName().matches("^fsimage_(\\d)+$"));
if (fsImageFiles.length != 1) {
throw new IllegalArgumentException(
"Must be exactly one fsimage file present in fs_image_dir");
}
fsImagePath = fsImageFiles[0].getPath().toString();
fsImageMD5Path = fsImageFiles[0].getPath().suffix(".md5").toString();
}
if (amMemory < 0) {
throw new IllegalArgumentException("Invalid memory specified for "
+ "application master, exiting. Specified memory=" + amMemory);
}
if (amVCores < 0) {
throw new IllegalArgumentException("Invalid virtual cores specified for "
+ "application master, exiting. Specified virtual cores=" + amVCores);
}
this.appName = commandLine.getOptionValue(APPNAME_ARG, APPNAME_DEFAULT);
this.amQueue = commandLine.getOptionValue(QUEUE_ARG, QUEUE_DEFAULT);
this.amMemory = Integer.parseInt(commandLineView on GitHub (pinned to 2add963021)
Solutions
- Point fs_image_dir at a directory containing exactly one fsimage file; remove extra files or copy the fsimage into an empty directory.
When it happens
Trigger: The fs_image_dir supplied to the dynamometer Client contains zero or more than one fsimage file, so the Client cannot determine which image to distribute to the simulated NameNode.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/9bdb686b3c60f4cb.
Report an issue: GitHub.