{"record":{"id":"7c4b870506947513","repo":"apache/hadoop","slug":"invalid-virtual-cores-specified-for-application-ma","errorCode":null,"errorMessage":"Invalid virtual cores specified for application master, exiting. Specified virtual cores={}","messagePattern":"Invalid virtual cores specified for application master, exiting\\. Specified virtual cores=(.+?)","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":439,"sourceCode":"      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 {\n      this.hadoopBinary = DynoInfraUtils.fetchHadoopTarball(\n          new File(\".\").getAbsoluteFile(),\n          commandLine.getOptionValue(HADOOP_VERSION_ARG), getConf(), LOG)\n          .toString();","sourceCodeStart":421,"sourceCodeEnd":457,"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#L421-L457","documentation":"Error \"Invalid virtual cores specified for application master, exiting. Specified virtual cores={}\" thrown in apache/hadoop.","triggerScenarios":"The -master_vcores 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_vcores value for the dynamometer client and resubmit."],"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-23T01:17:44.959Z"}