apache/hadoop · error · YarnException

Invalid reduce task, no attempt for a reducer!

Error message

Invalid reduce task, no attempt for a reducer!

What it means

Error "Invalid reduce task, no attempt for a reducer!" thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/AMDefinitionRumen.java:73

        throw new YarnException("Invalid map task, no attempt for a mapper!");
      }
      LoggedTaskAttempt taskAttempt =
          mapTask.getAttempts().get(mapTask.getAttempts().size() - 1);
      TaskContainerDefinition containerDef = builder
          .withHostname(taskAttempt.getHostName().getValue())
          .withDuration(taskAttempt.getFinishTime() -
              taskAttempt.getStartTime())
          .withPriority(DEFAULT_MAPPER_PRIORITY)
          .withType("map")
          .build();
      containerList.add(
          ContainerSimulator.createFromTaskContainerDefinition(containerDef));
    }

    // reducer
    for (LoggedTask reduceTask : job.getReduceTasks()) {
      if (reduceTask.getAttempts().size() == 0) {
        throw new YarnException(
            "Invalid reduce task, no attempt for a reducer!");
      }
      LoggedTaskAttempt taskAttempt =
          reduceTask.getAttempts().get(reduceTask.getAttempts().size() - 1);
      TaskContainerDefinition containerDef = builder
          .withHostname(taskAttempt.getHostName().getValue())
          .withDuration(taskAttempt.getFinishTime() -
              taskAttempt.getStartTime())
          .withPriority(DEFAULT_REDUCER_PRIORITY)
          .withType("reduce")
          .build();
      containerList.add(
          ContainerSimulator.createFromTaskContainerDefinition(containerDef));
    }

    return containerList;
  }

View on GitHub (pinned to 2add963021)

Solutions

  1. Check the Rumen trace: every reduce task must have at least one attempt recorded.

When it happens

Trigger: A reduce task parsed from the Rumen trace has no attempt information, so the SLS AM simulator cannot schedule it.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/562d72899943ceb3. Report an issue: GitHub.