{"record":{"id":"5563b37f39f64d21","repo":"apache/hadoop","slug":"could-not-validate-checksum","errorCode":null,"errorMessage":"Could not validate checksum","messagePattern":"Could not validate checksum","errorType":"exception","errorClass":"EOFException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IFileInputStream.java","lineNumber":120,"sourceCode":"  }\n\n  /**\n   * Close the input stream. Note that we need to read to the end of the\n   * stream to validate the checksum.\n   */\n  @Override\n  public void close() throws IOException {\n\n    if (curReadahead != null) {\n      curReadahead.cancel();\n    }\n    if (currentOffset < dataLength) {\n      byte[] t = new byte[Math.min((int)\n            (Integer.MAX_VALUE & (dataLength - currentOffset)), 32 * 1024)];\n      while (currentOffset < dataLength) {\n        int n = read(t, 0, t.length);\n        if (0 == n) {\n          throw new EOFException(\"Could not validate checksum\");\n        }\n      }\n    }\n    in.close();\n  }\n  \n  @Override\n  public long skip(long n) throws IOException {\n   throw new IOException(\"Skip not supported for IFileInputStream\");\n  }\n  \n  public long getPosition() {\n    return (currentOffset >= dataLength) ? dataLength : currentOffset;\n  }\n  \n  public long getSize() {\n    return checksumSize;\n  }","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IFileInputStream.java#L102-L138","documentation":"Error \"Could not validate checksum\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/IFileInputStream.java:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The spill checksum validation failed; rerun the map task to regenerate the spill file and check the local disk health on the node."],"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"}