apache/hadoop · error · RuntimeException

Version mismatch! Expected

Error message

Version mismatch! Expected {} got {}

What it means

Rumen state deserialization guard: the version recorded in the persisted JSON differs from the VERSION supported by this build, so the state file is incompatible and cannot be loaded.

Solutions

  1. Regenerate the persisted state with the current version, or restore using matching code and state versions.
Defensive patterns

Strategy: validation

When it happens

Trigger: A persisted state file was written by a different version of the state format than the current code expects.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/8f0b4d6e22e96a3c. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/state/StatePool.java:311

  }
  
  /**
   * Getters and setters for JSON serialization
   */
  
  /**
   * To be invoked only by the Jackson JSON serializer.
   */
  public long getVersion() {
    return VERSION;
  }
  
  /**
   * To be invoked only by the Jackson JSON deserializer.
   */
  public void setVersion(long version) {
    if (version != VERSION) {
      throw new RuntimeException("Version mismatch! Expected " + VERSION 
                                 + " got " + version);
    }
  }
  
  /**
   * To be invoked only by the Jackson JSON serializer.
   */
  public HashMap<String, StatePair> getStates() {
    return pool;
  }
  
  /**
   * To be invoked only by the Jackson JSON deserializer.
   */
  public void setStates(HashMap<String, StatePair> states) {
    if (pool.size() > 0) {
      throw new RuntimeException("Pool not empty!");
    }

View on GitHub (pinned to 2add963021)