{"record":{"id":"e9be70b4005c1233","repo":"apache/hadoop","slug":"checksum-error-file-at-errpos-exp-expect","errorCode":null,"errorMessage":"Checksum error: ${file} at ${errPos} exp: ${expected} got: ${calculated}","messagePattern":"Checksum error: (.+?) at (.+?) exp: (.+?) got: (.+?)","errorType":"exception","errorClass":"ChecksumException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputChecker.java","lineNumber":352,"sourceCode":"  }\n\n  private void verifySums(final byte b[], final int off, int read)\n    throws ChecksumException\n  {\n    int leftToVerify = read;\n    int verifyOff = 0;\n    checksumInts.rewind();\n    checksumInts.limit((read - 1)/maxChunkSize + 1);\n\n    while (leftToVerify > 0) {\n      sum.update(b, off + verifyOff, Math.min(leftToVerify, maxChunkSize));\n      int expected = checksumInts.get();\n      int calculated = (int)sum.getValue();\n      sum.reset();\n\n      if (expected != calculated) {\n        long errPos = chunkPos + verifyOff;\n        throw new ChecksumException(\n          \"Checksum error: \"+file+\" at \"+ errPos +\n          \" exp: \" + expected + \" got: \" + calculated, errPos);\n      }\n      leftToVerify -= maxChunkSize;\n      verifyOff += maxChunkSize;\n    }\n  }\n\n  /**\n   * Convert a checksum byte array to a long\n   * This is deprecated since 0.22 since it is no longer in use\n   * by this class.\n   *\n   * @param checksum check sum.\n   * @return crc.\n   */\n  @Deprecated\n  static public long checksum2long(byte[] checksum) {","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputChecker.java#L334-L370","documentation":"Error \"Checksum error: ${file} at ${errPos} exp: ${expected} got: ${calculated}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputChecker.java:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-read the file; a persistent checksum error indicates data corruption on disk or in transit.","Restore the file from a replica or backup.","Check storage hardware/logs for the DataNode or local disk hosting ${file}."],"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"}