apache/hadoop · error · IllegalArgumentException

taskType is neither MAP nor REDUCE

Error message

taskType is neither MAP nor REDUCE: {}

What it means

Rumen ZombieJob guard while making up an attempt for a synthetic job: the synthesized task type is neither MAP nor REDUCE, so no fabricated attempt can be generated.

Solutions

  1. Fix the trace so the taskType is MAP or REDUCE.
Defensive patterns

Strategy: validation

When it happens

Trigger: A task in the simulated job has a type that is neither MAP nor REDUCE when building the zombie task info.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java:733

                                               taskNumber, taskAttemptNumber));
      TaskAttemptInfo tai
        = new MapTaskAttemptInfo(state, taskInfo, runtime, null);
      return tai;
    } else if (taskType == TaskType.REDUCE) {
      State state = State.SUCCEEDED;
      long shuffleTime = 0;
      long sortTime = 0;
      long reduceTime = 0;

      // TODO make up state
      // state = makeUpState(taskAttemptNumber, job.getReducerTriesToSucceed());
      reduceTime = makeUpReduceRuntime(state);
      TaskAttemptInfo tai = new ReduceTaskAttemptInfo
        (state, taskInfo, shuffleTime, sortTime, reduceTime, null);
      return tai;
    }

    throw new IllegalArgumentException("taskType is neither MAP nor REDUCE: "
        + taskType);
  }

  private long makeUpReduceRuntime(State state) {
    long reduceTime = 0;
    for (int i = 0; i < 5; i++) {
      reduceTime = doMakeUpReduceRuntime(state);
      if (reduceTime >= 0) {
        return reduceTime;
      }
    }
    return 0;
  }

  private long doMakeUpReduceRuntime(State state) {
    long reduceTime;
    try {
      if (state == State.SUCCEEDED) {

View on GitHub (pinned to 2add963021)