{"record":{"id":"e7c3671525d754b5","repo":"apache/hadoop","slug":"tasktype-is-neither-map-nor-reduce","errorCode":null,"errorMessage":"taskType is neither MAP nor REDUCE: {}","messagePattern":"taskType is neither MAP nor REDUCE: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java","lineNumber":733,"sourceCode":"                                               taskNumber, taskAttemptNumber));\n      TaskAttemptInfo tai\n        = new MapTaskAttemptInfo(state, taskInfo, runtime, null);\n      return tai;\n    } else if (taskType == TaskType.REDUCE) {\n      State state = State.SUCCEEDED;\n      long shuffleTime = 0;\n      long sortTime = 0;\n      long reduceTime = 0;\n\n      // TODO make up state\n      // state = makeUpState(taskAttemptNumber, job.getReducerTriesToSucceed());\n      reduceTime = makeUpReduceRuntime(state);\n      TaskAttemptInfo tai = new ReduceTaskAttemptInfo\n        (state, taskInfo, shuffleTime, sortTime, reduceTime, null);\n      return tai;\n    }\n\n    throw new IllegalArgumentException(\"taskType is neither MAP nor REDUCE: \"\n        + taskType);\n  }\n\n  private long makeUpReduceRuntime(State state) {\n    long reduceTime = 0;\n    for (int i = 0; i < 5; i++) {\n      reduceTime = doMakeUpReduceRuntime(state);\n      if (reduceTime >= 0) {\n        return reduceTime;\n      }\n    }\n    return 0;\n  }\n\n  private long doMakeUpReduceRuntime(State state) {\n    long reduceTime;\n    try {\n      if (state == State.SUCCEEDED) {","sourceCodeStart":715,"sourceCodeEnd":751,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java#L715-L751","documentation":"Error \"taskType is neither MAP nor REDUCE: {}\" thrown in apache/hadoop.","triggerScenarios":"A task in the simulated job has a type that is neither MAP nor REDUCE when building the zombie task info.","commonSituations":"See trigger scenarios.","solutions":["Fix the trace so the taskType is MAP or REDUCE."],"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"}