apache/hadoop · error · IllegalArgumentException
Invalid memory specified for application master, exiting. Sp
Error message
Invalid memory specified for application master, exiting. Specified memory={} What it means
Error "Invalid memory specified for application master, exiting. Specified memory={}" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java:435
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(commandLine
.getOptionValue(MASTER_MEMORY_MB_ARG, MASTER_MEMORY_MB_DEFAULT));
this.amVCores = Integer.parseInt(
commandLine.getOptionValue(MASTER_VCORES_ARG, MASTER_VCORES_DEFAULT));
this.confPath = commandLine.getOptionValue(CONF_PATH_ARG);
this.blockListPath = commandLine.getOptionValue(BLOCK_LIST_PATH_ARG);
if (commandLine.hasOption(HADOOP_BINARY_PATH_ARG)) {
this.hadoopBinary = commandLine.getOptionValue(HADOOP_BINARY_PATH_ARG);
} else {View on GitHub (pinned to 2add963021)
Solutions
- Set a positive --am_memory value (in MB) for the dynamometer client and resubmit.
Example fix
hadoop jar dynamometer.jar ... --am_memory 4096
When it happens
Trigger: The -master_memory argument passed to the dynamometer Client is not a positive integer, so the application master container request cannot be built.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/d2b0e5b1e281ee58.
Report an issue: GitHub.