{"record":{"id":"8f0b4d6e22e96a3c","repo":"apache/hadoop","slug":"version-mismatch-expected-got","errorCode":null,"errorMessage":"Version mismatch! Expected {} got {}","messagePattern":"Version mismatch! Expected (.+?) got (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/state/StatePool.java","lineNumber":311,"sourceCode":"  }\n  \n  /**\n   * Getters and setters for JSON serialization\n   */\n  \n  /**\n   * To be invoked only by the Jackson JSON serializer.\n   */\n  public long getVersion() {\n    return VERSION;\n  }\n  \n  /**\n   * To be invoked only by the Jackson JSON deserializer.\n   */\n  public void setVersion(long version) {\n    if (version != VERSION) {\n      throw new RuntimeException(\"Version mismatch! Expected \" + VERSION \n                                 + \" got \" + version);\n    }\n  }\n  \n  /**\n   * To be invoked only by the Jackson JSON serializer.\n   */\n  public HashMap<String, StatePair> getStates() {\n    return pool;\n  }\n  \n  /**\n   * To be invoked only by the Jackson JSON deserializer.\n   */\n  public void setStates(HashMap<String, StatePair> states) {\n    if (pool.size() > 0) {\n      throw new RuntimeException(\"Pool not empty!\");\n    }","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/state/StatePool.java#L293-L329","documentation":"Error \"Version mismatch! Expected {} got {}\" thrown in apache/hadoop.","triggerScenarios":"A persisted state file was written by a different version of the state format than the current code expects.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the persisted state with the current version, or restore using matching code and state versions."],"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"}