{"record":{"id":"562d72899943ceb3","repo":"apache/hadoop","slug":"invalid-reduce-task-no-attempt-for-a-reducer","errorCode":null,"errorMessage":"Invalid reduce task, no attempt for a reducer!","messagePattern":"Invalid reduce task, no attempt for a reducer!","errorType":"exception","errorClass":"YarnException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/AMDefinitionRumen.java","lineNumber":73,"sourceCode":"        throw new YarnException(\"Invalid map task, no attempt for a mapper!\");\n      }\n      LoggedTaskAttempt taskAttempt =\n          mapTask.getAttempts().get(mapTask.getAttempts().size() - 1);\n      TaskContainerDefinition containerDef = builder\n          .withHostname(taskAttempt.getHostName().getValue())\n          .withDuration(taskAttempt.getFinishTime() -\n              taskAttempt.getStartTime())\n          .withPriority(DEFAULT_MAPPER_PRIORITY)\n          .withType(\"map\")\n          .build();\n      containerList.add(\n          ContainerSimulator.createFromTaskContainerDefinition(containerDef));\n    }\n\n    // reducer\n    for (LoggedTask reduceTask : job.getReduceTasks()) {\n      if (reduceTask.getAttempts().size() == 0) {\n        throw new YarnException(\n            \"Invalid reduce task, no attempt for a reducer!\");\n      }\n      LoggedTaskAttempt taskAttempt =\n          reduceTask.getAttempts().get(reduceTask.getAttempts().size() - 1);\n      TaskContainerDefinition containerDef = builder\n          .withHostname(taskAttempt.getHostName().getValue())\n          .withDuration(taskAttempt.getFinishTime() -\n              taskAttempt.getStartTime())\n          .withPriority(DEFAULT_REDUCER_PRIORITY)\n          .withType(\"reduce\")\n          .build();\n      containerList.add(\n          ContainerSimulator.createFromTaskContainerDefinition(containerDef));\n    }\n\n    return containerList;\n  }\n","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/AMDefinitionRumen.java#L55-L91","documentation":"Error \"Invalid reduce task, no attempt for a reducer!\" thrown in apache/hadoop.","triggerScenarios":"A reduce task parsed from the Rumen trace has no attempt information, so the SLS AM simulator cannot schedule it.","commonSituations":"See trigger scenarios.","solutions":["Check the Rumen trace: every reduce task must have at least one attempt recorded."],"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"}