{"record":{"id":"739cd3133a43b6a8","repo":"apache/hadoop","slug":"unexpected-type-of-tasks-in-the-list","errorCode":null,"errorMessage":"Unexpected type of tasks in the list...","messagePattern":"Unexpected type of tasks in the list\\.\\.\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ParsedJob.java","lineNumber":154,"sourceCode":"   * @return the list of other tasks of this job\n   */\n  public List<ParsedTask> obtainOtherTasks() {\n    List<LoggedTask> tasks = super.getOtherTasks();\n    return convertTasks(tasks);\n  }\n\n  /** As we know that this list of {@link LoggedTask} objects is actually a list\n   * of {@link ParsedTask} objects, we go ahead and cast them.\n   * @return the list of {@link ParsedTask} objects\n   */\n  private List<ParsedTask> convertTasks(List<LoggedTask> tasks) {\n    List<ParsedTask> result = new ArrayList<ParsedTask>();\n\n    for (LoggedTask t : tasks) {\n      if (t instanceof ParsedTask) {\n        result.add((ParsedTask)t);\n      } else {\n        throw new RuntimeException(\"Unexpected type of tasks in the list...\");\n      }\n    }\n    return result;\n  }\n\n  /** Dump the extra info of ParsedJob */\n  void dumpParsedJob() {\n    LOG.info(\"ParsedJob details:\" + obtainTotalCounters() + \";\"\n        + obtainMapCounters() + \";\" + obtainReduceCounters()\n        + \"\\n\" + obtainJobConfpath() + \"\\n\" + obtainJobAcls()\n        + \";Q=\" + (getQueue() == null ? \"null\" : getQueue().getValue()));\n    List<ParsedTask> maps = obtainMapTasks();\n    for (ParsedTask task : maps) {\n      task.dumpParsedTask();\n    }\n    List<ParsedTask> reduces = obtainReduceTasks();\n    for (ParsedTask task : reduces) {\n      task.dumpParsedTask();","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/ParsedJob.java#L136-L172","documentation":"Error \"Unexpected type of tasks in the list...\" thrown in apache/hadoop.","triggerScenarios":"ParsedJob encounters a task object of an unexpected runtime type in the job's task list, indicating corrupted deserialized job data.","commonSituations":"See trigger scenarios.","solutions":["Ensure all entries in the task list are of the expected ParsedTask subtype; the list contains an unexpected type."],"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-22T20:17:22.307Z"}