{"record":{"id":"6b4c6be200f95868","repo":"apache/hadoop","slug":"state-is-neither-succeeded-nor-failed","errorCode":null,"errorMessage":"state is neither SUCCEEDED nor FAILED: {}","messagePattern":"state is neither SUCCEEDED nor FAILED: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java","lineNumber":756,"sourceCode":"    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) {\n        reduceTime = makeUpRuntime(job.getSuccessfulReduceAttemptCDF());\n      } else if (state == State.FAILED) {\n        reduceTime = makeUpRuntime(job.getFailedReduceAttemptCDF());\n      } else {\n        throw new IllegalArgumentException(\n            \"state is neither SUCCEEDED nor FAILED: \" + state);\n      }\n      return reduceTime;\n    } catch (NoValueToMakeUpRuntime e) {\n      return 0;\n    }\n  }\n\n  private long makeUpMapRuntime(State state, int locality) {\n    long runtime;\n    // make up runtime\n    if (state == State.SUCCEEDED || state == State.FAILED) {\n      List<LoggedDiscreteCDF> cdfList =\n          state == State.SUCCEEDED ? job.getSuccessfulMapAttemptCDFs() : job\n              .getFailedMapAttemptCDFs();\n      // XXX MapCDFs is a ArrayList of 4 possible groups: distance=0, 1, 2, and\n      // the last group is \"distance cannot be determined\". All pig jobs\n      // would have only the 4th group, and pig tasks usually do not have","sourceCodeStart":738,"sourceCodeEnd":774,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ZombieJob.java#L738-L774","documentation":"Error \"state is neither SUCCEEDED nor FAILED: {}\" thrown in apache/hadoop.","triggerScenarios":"A finished task in the simulated job reports a state other than SUCCEEDED or FAILED, which ZombieJob does not handle.","commonSituations":"See trigger scenarios.","solutions":["Fix the trace so the task state is SUCCEEDED or FAILED for this code path."],"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"}