{"record":{"id":"bede7be1dcec054a","repo":"apache/hadoop","slug":"invalid-am-memory-or-vcores-memory-vcores","errorCode":null,"errorMessage":"Invalid AM memory or vcores: memory={}, vcores={}","messagePattern":"Invalid AM memory or vcores: memory=(.+?), vcores=(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java","lineNumber":545,"sourceCode":"    QueueInfo queueInfo = yarnClient.getQueueInfo(this.amQueue);\n    LOG.info(\"Queue info: queueName={}, queueCurrentCapacity={}, \"\n        + \"queueMaxCapacity={}, queueApplicationCount={}, \"\n        + \"queueChildQueueCount={}\", queueInfo.getQueueName(),\n        queueInfo.getCurrentCapacity(), queueInfo.getMaximumCapacity(),\n        queueInfo.getApplications().size(), queueInfo.getChildQueues().size());\n\n    // Get a new application id\n    YarnClientApplication app = yarnClient.createApplication();\n    GetNewApplicationResponse appResponse = app.getNewApplicationResponse();\n    long maxMem = appResponse.getMaximumResourceCapability().getMemorySize();\n    LOG.info(\"Max mem capabililty of resources in this cluster \" + maxMem);\n    int maxVCores = appResponse.getMaximumResourceCapability()\n        .getVirtualCores();\n    LOG.info(\"Max virtual cores capabililty of resources in this cluster {}\",\n        maxVCores);\n    if (amMemory > maxMem || amMemory < 0 || amVCores > maxVCores\n        || amVCores < 0) {\n      throw new IllegalArgumentException(\"Invalid AM memory or vcores: memory=\"\n          + amMemory + \", vcores=\" + amVCores);\n    }\n    amOptions.verify(maxMem, maxVCores);\n\n    // set the application name\n    ApplicationSubmissionContext appContext =\n        app.getApplicationSubmissionContext();\n    infraAppId = appContext.getApplicationId();\n    appContext.setApplicationName(appName);\n\n    // Set up the container launch context for the application master\n    ContainerLaunchContext amContainer = Records\n        .newRecord(ContainerLaunchContext.class);\n    Map<ApplicationAccessType, String> acls = new HashMap<>();\n    acls.put(ApplicationAccessType.VIEW_APP, getConf().get(\n        MRJobConfig.JOB_ACL_VIEW_JOB, MRJobConfig.DEFAULT_JOB_ACL_VIEW_JOB));\n    amContainer.setApplicationACLs(acls);\n","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java#L527-L563","documentation":"Error \"Invalid AM memory or vcores: memory={}, vcores={}\" thrown in apache/hadoop.","triggerScenarios":"The application master memory or vcore values requested exceed the maximum allocation of the YARN cluster, so the Client aborts before submitting the application.","commonSituations":"See trigger scenarios.","solutions":["Provide positive values for both --am_memory and --am_vcores and resubmit the dynamometer job."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}