{"record":{"id":"9ef4c629a4fe8676","repo":"apache/hadoop","slug":"checksum-error","errorCode":null,"errorMessage":"Checksum Error","messagePattern":"Checksum Error","errorType":"exception","errorClass":"ChecksumException","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":213,"sourceCode":"        bytesRead += checksumSize;\n        currentOffset += checksumSize;\n      }\n    }\n    return bytesRead;\n  }\n\n  private int doRead(byte[]b, int off, int len) throws IOException {\n    \n    // If we are trying to read past the end of data, just read\n    // the left over data\n    if (currentOffset + len > dataLength) {\n      len = (int) dataLength - (int)currentOffset;\n    }\n    \n    int bytesRead = in.read(b, off, len);\n\n    if (bytesRead < 0) {\n      throw new ChecksumException(\"Checksum Error\", 0);\n    }\n    \n    sum.update(b,off,bytesRead);\n\n    currentOffset += bytesRead;\n\n    if (disableChecksumValidation) {\n      return bytesRead;\n    }\n    \n    if (currentOffset == dataLength) {\n      // The last four bytes are checksum. Strip them and verify\n      csum = new byte[checksumSize];\n      IOUtils.readFully(in, csum, 0, checksumSize);\n      if (!sum.compare(csum, 0)) {\n        throw new ChecksumException(\"Checksum Error\", 0);\n      }\n    }","sourceCodeStart":195,"sourceCodeEnd":231,"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#L195-L231","documentation":"Error \"Checksum Error\" 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:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["A checksum mismatch occurred reading spill data; retry the task, and check DataNode/local disk integrity if it recurs on the same 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"}