{"record":{"id":"becdaadadb3cc6f4","repo":"apache/hadoop","slug":"bad-job-id-jobidstr-in-state-store","errorCode":null,"errorMessage":"Bad job ID {jobIdStr} in state store","messagePattern":"Bad job ID (.+?) in state store","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java","lineNumber":606,"sourceCode":"        \"Incompatible version for state DB schema: expecting DB schema version \" \n            + getCurrentVersion() + \", but loading version \" + loadedVersion);\n    }\n  }\n\n  private void addJobToken(JobID jobId, String user,\n      Token<JobTokenIdentifier> jobToken) {\n    userRsrc.put(jobId.toString(), user);\n    secretManager.addTokenForJob(jobId.toString(), jobToken);\n    LOG.info(\"Added token for \" + jobId.toString());\n  }\n\n  private void recoverJobShuffleInfo(String jobIdStr, byte[] data)\n      throws IOException {\n    JobID jobId;\n    try {\n      jobId = JobID.forName(jobIdStr);\n    } catch (IllegalArgumentException e) {\n      throw new IOException(\"Bad job ID \" + jobIdStr + \" in state store\", e);\n    }\n\n    JobShuffleInfoProto proto = JobShuffleInfoProto.parseFrom(data);\n    String user = proto.getUser();\n    TokenProto tokenProto = proto.getJobToken();\n    Token<JobTokenIdentifier> jobToken = new Token<>(\n        tokenProto.getIdentifier().toByteArray(),\n        tokenProto.getPassword().toByteArray(),\n        new Text(tokenProto.getKind()), new Text(tokenProto.getService()));\n    addJobToken(jobId, user, jobToken);\n  }\n\n  private void recordJobShuffleInfo(JobID jobId, String user,\n      Token<JobTokenIdentifier> jobToken) throws IOException {\n    if (stateDb != null) {\n      TokenProto tokenProto = TokenProto.newBuilder()\n          .setIdentifier(ByteString.copyFrom(jobToken.getIdentifier()))\n          .setPassword(ByteString.copyFrom(jobToken.getPassword()))","sourceCodeStart":588,"sourceCodeEnd":624,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java#L588-L624","documentation":"Error \"Bad job ID {jobIdStr} in state store\" thrown in apache/hadoop.","triggerScenarios":"Thrown by ShuffleHandler while replaying the recovery state store when a stored jobId string cannot be parsed. The state DB entry is corrupt; remove the recovery state store and restart the shuffle service.","commonSituations":"See trigger scenarios.","solutions":["The state store contains a malformed job id entry; clear or repair the recovery DB, or upgrade to a version that tolerates the entry.","Investigate how the bad entry was written (mixed versions writing to the same store)."],"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"}