{"record":{"id":"b82df3e696c2af27","repo":"apache/hadoop","slug":"nosuchupload","errorCode":"NoSuchUpload","errorMessage":"NoSuchUpload: upload ID is invalid or the upload has been aborted","messagePattern":"NoSuchUpload: upload ID is invalid or the upload has been aborted","errorType":"exception","errorClass":"IOException","httpStatus":404,"severity":"error","filePath":"hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java","lineNumber":425,"sourceCode":"  /** {@inheritDoc} */\n  @Override\n  public CompleteMultipartUploadResponse\n      completeMultipartUpload(\n          CompleteMultipartUploadRequest request)\n      throws IOException {\n    CompleteMultipartUploadResponse response = null;\n    try {\n      response =\n          bosClient.completeMultipartUpload(request);\n    } catch (BceServiceException e) {\n      if (BOS_NO_SUCH_KEY_CODE == e.getStatusCode()\n          && e.getErrorCode() != null\n          && e.getErrorCode().trim()\n              .equals(\"NoSuchUpload\")) {\n        LOG.warn(\"The upload ID might be invalid, or\"\n            + \" the multipart upload might have been\"\n            + \" aborted or completed.\");\n        throw new IOException(\n            \"NoSuchUpload: upload ID is invalid or\"\n                + \" the upload has been aborted\", e);\n      } else {\n        handleBosServiceException(e);\n      }\n\n    }\n    return response;\n  }\n\n  /** {@inheritDoc} */\n  @Override\n  public InitiateMultipartUploadResponse\n      initiateMultipartUpload(\n          InitiateMultipartUploadRequest request)\n      throws IOException {\n    InitiateMultipartUploadResponse response = null;\n    try {","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java#L407-L443","documentation":"ZombieJob.scaleInfo() is only meaningful for map attempts (its whole job is scaling node-local/rack-local/rack-remote runtimes), so after the Values.MAP branch it throws IllegalArgumentException('taskType can only be MAP: <t>') for anything else. scaleInfo() is reached from getMapTaskAttemptInfoAdjusted() when a logged successful map attempt is re-simulated at a different locality; the error therefore implies the logged task carrying that attempt is not typed MAP even though it was fetched through the map path — a task-type mismatch inside the trace or in the code that fetched the task.","triggerScenarios":"getLoggedTask(TaskType.MAP, n) returning a LoggedTask whose internal getTaskType() is REDUCE/CLEANUP/SETUP (trace lists the attempt under a map index but the record says otherwise), then locality-adjusted replay forcing the scaleInfo() branch; hand-assembled LoggedTask/LoggedTaskAttempt pairs with inconsistent types.","commonSituations":"Traces whose task lists were reordered or edited so attempt-to-task association is off by one; custom JobStory code that looks up tasks by number across mixed-type lists; older traces mixing SETUP/CLEANUP tasks into the map list.","solutions":["Verify the trace's internal consistency: each task in the MAP list must have taskType MAP and its attempts must belong to it (compare taskIDs/attemptIDs).","Regenerate the trace with rumen tooling from the original job history rather than editing it by hand.","In custom lookups, filter by getTaskType() == Values.MAP before indexing into the map task list, and skip mismatched records with a warning."],"exampleFix":"// before: fetching by number from a mixed list\nLoggedTask t = allTasks.get(taskNumber);\n// t.getTaskType() may be REDUCE -> scaleInfo() throws later\n\n// after: filter by type first\nLoggedTask t = null;\nfor (LoggedTask c : allTasks) {\n  if (c.getTaskType() == Values.MAP && mapIndex++ == taskNumber) { t = c; break; }\n}","handlingStrategy":"type-guard","validationCode":"static boolean isMapTaskWithMapAttempts(LoggedTask t, LoggedTaskAttempt a) {\n  return t.getTaskType() == Values.MAP && a != null\n      && (a.getAttemptID() == null || t.getTaskID() == null\n          || a.getAttemptID().toString().startsWith(t.getTaskID().toString()));\n}","typeGuard":"static boolean isMapTask(LoggedTask t) {\n  return t != null && t.getTaskType() == Values.MAP;\n}","tryCatchPattern":null,"preventionTips":["Keep map and reduce task lists separate and type-consistent in any trace you produce or edit.","Verify attemptID prefixes match the owning taskID when loading traces.","Never hand-reorder task arrays in trace files."],"tags":["hadoop","rumen","task-type-mismatch","job-trace","locality-simulation"],"backgroundTag":"task-type-mismatch","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}