{"record":{"id":"d2b0e5b1e281ee58","repo":"apache/hadoop","slug":"invalid-memory-specified-for-application-master-e","errorCode":null,"errorMessage":"Invalid memory specified for application master, exiting. Specified memory={}","messagePattern":"Invalid memory specified for application master, exiting\\. Specified memory=(.+?)","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":435,"sourceCode":"          commandLine.getOptionValue(NAMENODE_SERVICERPC_ADDR_ARG);\n    } else {\n      launchNameNode = true;\n      FileSystem localFS = FileSystem.getLocal(getConf());\n      fsImageDir = fsImageDir.makeQualified(localFS.getUri(),\n          localFS.getWorkingDirectory());\n      FileSystem fsImageFS = fsImageDir.getFileSystem(getConf());\n      FileStatus[] fsImageFiles = fsImageFS.listStatus(fsImageDir,\n          (path) -> path.getName().matches(\"^fsimage_(\\\\d)+$\"));\n      if (fsImageFiles.length != 1) {\n        throw new IllegalArgumentException(\n            \"Must be exactly one fsimage file present in fs_image_dir\");\n      }\n      fsImagePath = fsImageFiles[0].getPath().toString();\n      fsImageMD5Path = fsImageFiles[0].getPath().suffix(\".md5\").toString();\n    }\n\n    if (amMemory < 0) {\n      throw new IllegalArgumentException(\"Invalid memory specified for \"\n          + \"application master, exiting. Specified memory=\" + amMemory);\n    }\n    if (amVCores < 0) {\n      throw new IllegalArgumentException(\"Invalid virtual cores specified for \"\n          + \"application master, exiting. Specified virtual cores=\" + amVCores);\n    }\n\n    this.appName = commandLine.getOptionValue(APPNAME_ARG, APPNAME_DEFAULT);\n    this.amQueue = commandLine.getOptionValue(QUEUE_ARG, QUEUE_DEFAULT);\n    this.amMemory = Integer.parseInt(commandLine\n        .getOptionValue(MASTER_MEMORY_MB_ARG, MASTER_MEMORY_MB_DEFAULT));\n    this.amVCores = Integer.parseInt(\n        commandLine.getOptionValue(MASTER_VCORES_ARG, MASTER_VCORES_DEFAULT));\n    this.confPath = commandLine.getOptionValue(CONF_PATH_ARG);\n    this.blockListPath = commandLine.getOptionValue(BLOCK_LIST_PATH_ARG);\n    if (commandLine.hasOption(HADOOP_BINARY_PATH_ARG)) {\n      this.hadoopBinary = commandLine.getOptionValue(HADOOP_BINARY_PATH_ARG);\n    } else {","sourceCodeStart":417,"sourceCodeEnd":453,"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#L417-L453","documentation":"Error \"Invalid memory specified for application master, exiting. Specified memory={}\" thrown in apache/hadoop.","triggerScenarios":"The -master_memory argument passed to the dynamometer Client is not a positive integer, so the application master container request cannot be built.","commonSituations":"See trigger scenarios.","solutions":["Set a positive --am_memory value (in MB) for the dynamometer client and resubmit."],"exampleFix":"hadoop jar dynamometer.jar ... --am_memory 4096","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"}