apache/hadoop · error · IllegalArgumentException
Invalid AM memory or vcores: memory={}, vcores={}
Error message
Invalid AM memory or vcores: memory={}, vcores={} What it means
Error "Invalid AM memory or vcores: memory={}, vcores={}" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java:545
QueueInfo queueInfo = yarnClient.getQueueInfo(this.amQueue);
LOG.info("Queue info: queueName={}, queueCurrentCapacity={}, "
+ "queueMaxCapacity={}, queueApplicationCount={}, "
+ "queueChildQueueCount={}", queueInfo.getQueueName(),
queueInfo.getCurrentCapacity(), queueInfo.getMaximumCapacity(),
queueInfo.getApplications().size(), queueInfo.getChildQueues().size());
// Get a new application id
YarnClientApplication app = yarnClient.createApplication();
GetNewApplicationResponse appResponse = app.getNewApplicationResponse();
long maxMem = appResponse.getMaximumResourceCapability().getMemorySize();
LOG.info("Max mem capabililty of resources in this cluster " + maxMem);
int maxVCores = appResponse.getMaximumResourceCapability()
.getVirtualCores();
LOG.info("Max virtual cores capabililty of resources in this cluster {}",
maxVCores);
if (amMemory > maxMem || amMemory < 0 || amVCores > maxVCores
|| amVCores < 0) {
throw new IllegalArgumentException("Invalid AM memory or vcores: memory="
+ amMemory + ", vcores=" + amVCores);
}
amOptions.verify(maxMem, maxVCores);
// set the application name
ApplicationSubmissionContext appContext =
app.getApplicationSubmissionContext();
infraAppId = appContext.getApplicationId();
appContext.setApplicationName(appName);
// Set up the container launch context for the application master
ContainerLaunchContext amContainer = Records
.newRecord(ContainerLaunchContext.class);
Map<ApplicationAccessType, String> acls = new HashMap<>();
acls.put(ApplicationAccessType.VIEW_APP, getConf().get(
MRJobConfig.JOB_ACL_VIEW_JOB, MRJobConfig.DEFAULT_JOB_ACL_VIEW_JOB));
amContainer.setApplicationACLs(acls);
View on GitHub (pinned to 2add963021)
Solutions
- Provide positive values for both --am_memory and --am_vcores and resubmit the dynamometer job.
When it happens
Trigger: The application master memory or vcore values requested exceed the maximum allocation of the YARN cluster, so the Client aborts before submitting the application.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/bede7be1dcec054a.
Report an issue: GitHub.