{"record":{"id":"2b7aa68f2f44490f","repo":"apache/hadoop","slug":"the-number-of-map-tasks-maps-exceeded-limit-m","errorCode":null,"errorMessage":"The number of map tasks ${maps} exceeded limit ${maxMaps}","messagePattern":"The number of map tasks (.+?) exceeded limit (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobSubmitter.java","lineNumber":208,"sourceCode":"        conf.setInt(MRJobConfig.MR_AM_MAX_ATTEMPTS, 1);\n        LOG.warn(\"Max job attempts set to 1 since encrypted intermediate\" +\n                \"data spill is enabled\");\n      }\n\n      copyAndConfigureFiles(job, submitJobDir);\n\n      Path submitJobFile = JobSubmissionFiles.getJobConfPath(submitJobDir);\n      \n      // Create the splits for the job\n      LOG.debug(\"Creating splits at \" + jtFs.makeQualified(submitJobDir));\n      int maps = writeSplits(job, submitJobDir);\n      conf.setInt(MRJobConfig.NUM_MAPS, maps);\n      LOG.info(\"number of splits:\" + maps);\n\n      int maxMaps = conf.getInt(MRJobConfig.JOB_MAX_MAP,\n          MRJobConfig.DEFAULT_JOB_MAX_MAP);\n      if (maxMaps >= 0 && maxMaps < maps) {\n        throw new IllegalArgumentException(\"The number of map tasks \" + maps +\n            \" exceeded limit \" + maxMaps);\n      }\n\n      // write \"queue admins of the queue to which job is being submitted\"\n      // to job file.\n      String queue = conf.get(MRJobConfig.QUEUE_NAME,\n          JobConf.DEFAULT_QUEUE_NAME);\n      AccessControlList acl = submitClient.getQueueAdmins(queue);\n      conf.set(toFullPropertyName(queue,\n          QueueACL.ADMINISTER_JOBS.getAclName()), acl.getAclString());\n\n      // removing jobtoken referrals before copying the jobconf to HDFS\n      // as the tasks don't need this setting, actually they may break\n      // because of it if present as the referral will point to a\n      // different job.\n      TokenCache.cleanUpTokenReferral(conf);\n\n      if (conf.getBoolean(","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobSubmitter.java#L190-L226","documentation":"Enforcement of the cluster-wide cap mapreduce.job.max.map (MR_AM_MAX_MAPS) during JobSubmitter.submitJobInternal: after computing the number of splits, if the job's map count exceeds the configured maximum, submission is rejected with an IOException naming both the requested count and the limit. The fix is to reduce input splits/parallelism or raise the cluster limit.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobSubmitter.java:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the number of input splits/maps (larger split size) or raise mapreduce.job.max.map / the configured map limit."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}