{"record":{"id":"78f65ca2fe31c4a4","repo":"apache/hadoop","slug":"key-key-does-not-exist-in-bos","errorCode":null,"errorMessage":"Key '\" + key + \"' does not exist in BOS","messagePattern":"Key '\" \\+ key \\+ \"' does not exist in BOS","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":404,"severity":"error","filePath":"hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java","lineNumber":488,"sourceCode":"    if (bosClient != null) {\n      bosClient.shutdown();\n      bosClient = null;\n    }\n  }\n\n  /**\n   * Handles a BOS service exception with key context. If the\n   * error is a 404, throws {@link FileNotFoundException}.\n   *\n   * @param key the object key involved in the operation\n   * @param e   the BOS service exception\n   * @throws IOException wrapping the service exception\n   */\n  private void handleBosServiceException(\n      String key, BceServiceException e)\n      throws IOException {\n    if (BOS_NO_SUCH_KEY_CODE == e.getStatusCode()) {\n      throw new FileNotFoundException(\n          \"Key '\" + key + \"' does not exist in BOS\");\n    } else {\n      handleBosServiceException(e);\n    }\n  }\n\n  /**\n   * Handles a BOS service exception, translating it into the\n   * appropriate IOException subclass based on status code and\n   * error code.\n   *\n   * @param e the BOS service exception\n   * @throws IOException wrapping the service exception\n   */\n  private void handleBosServiceException(\n      BceServiceException e) throws IOException {\n    // process all 400 status, because as token expired\n    // bos server return \"Error Code=null\" when request","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java#L470-L506","documentation":"ZombieJob.getTaskAttemptInfo(loggedTask, loggedAttempt) dispatches on loggedTask.getTaskType(): MAP and REDUCE produce Map/ReduceTaskAttemptInfo, and the final else throws IllegalArgumentException naming the task ID and its type. The accepted set is exactly MAP and REDUCE — SETUP, CLEANUP, JOB_SETUP, JOB_CLEANUP, ACTION or a null type all fail here. This is the generic attempt-info path used for both map and reduce simulation.","triggerScenarios":"Calling getTaskAttemptInfo(...) (directly, or via getMapTaskAttemptInfoAdjusted()'s FAILED-attempt branch, or a JobStory's getTaskAttemptInfoAT/ATI) on a LoggedTask whose taskType is not MAP or REDUCE; traces containing setup/cleanup task records that reach the simulation path.","commonSituations":"Replaying rumen traces that include non-map/reduce tasks (job setup/cleanup) without filtering; custom schedulers/simulators that iterate every task in a LoggedJob instead of only map+reduce; traces where taskType is null due to damaged records.","solutions":["Iterate only over map and reduce tasks: filter LoggedJob.getMapTasks()/getReduceTasks() or check getTaskType() before requesting attempt info.","If setup/cleanup work matters for your simulation, model its cost separately instead of routing it through getTaskAttemptInfo().","Repair traces whose taskType is null/unknown — usually a sign of hand-editing or version mismatch."],"exampleFix":"// before\nfor (LoggedTask t : loggedJob.getAllTasks()) {\n  story.getTaskAttemptInfo(t, t.getAttempts().get(0)); // throws on SETUP/CLEANUP\n}\n\n// after\nfor (LoggedTask t : loggedJob.getAllTasks()) {\n  Values type = t.getTaskType();\n  if (type != Values.MAP && type != Values.REDUCE) {\n    continue; // ignore setup/cleanup tasks\n  }\n  story.getTaskAttemptInfo(t, t.getAttempts().get(0));\n}","handlingStrategy":"type-guard","validationCode":"static boolean isSimulationTaskType(Values type) {\n  return type == Values.MAP || type == Values.REDUCE;\n}","typeGuard":"static boolean isSimulatableTask(LoggedTask t) {\n  Values type = (t == null) ? null : t.getTaskType();\n  return type == Values.MAP || type == Values.REDUCE;\n}","tryCatchPattern":null,"preventionTips":["Iterate only mapTasks and reduceTasks lists; skip SETUP/CLEANUP records.","Type-check LoggedTask.getTaskType() before any attempt-info request.","Fail trace loads early with a clear count of skipped non-map/reduce tasks."],"tags":["hadoop","rumen","unsupported-task-type","job-trace","task-attempt"],"backgroundTag":"unsupported-task-type","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}