apache/hadoop · error · YarnException

Invalid map task, no attempt for a mapper!

Error message

Invalid map task, no attempt for a mapper!

What it means

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

Source

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

    super(builder);
  }

  public static List<ContainerSimulator> getTaskContainers(LoggedJob job,
      SLSRunner slsRunner) throws YarnException {
    List<ContainerSimulator> containerList = new ArrayList<>();

    TaskContainerDefinition.Builder builder =
        TaskContainerDefinition.Builder.create()
            .withCount(1)
            .withResource(slsRunner.getDefaultContainerResource())
            .withExecutionType(ExecutionType.GUARANTEED)
            .withAllocationId(-1)
            .withRequestDelay(0);

    // mapper
    for (LoggedTask mapTask : job.getMapTasks()) {
      if (mapTask.getAttempts().size() == 0) {
        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(

View on GitHub (pinned to 2add963021)

Solutions

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

When it happens

Trigger: A map 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/b85120c1ef4f30d9. Report an issue: GitHub.