apache/hadoop · error · ChecksumException

Checksum error: ${file} at ${errPos} exp: ${expected} got: $

Error message

Checksum error: ${file} at ${errPos} exp: ${expected} got: ${calculated}

What it means

Error "Checksum error: ${file} at ${errPos} exp: ${expected} got: ${calculated}" thrown in apache/hadoop.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputChecker.java:352

  }

  private void verifySums(final byte b[], final int off, int read)
    throws ChecksumException
  {
    int leftToVerify = read;
    int verifyOff = 0;
    checksumInts.rewind();
    checksumInts.limit((read - 1)/maxChunkSize + 1);

    while (leftToVerify > 0) {
      sum.update(b, off + verifyOff, Math.min(leftToVerify, maxChunkSize));
      int expected = checksumInts.get();
      int calculated = (int)sum.getValue();
      sum.reset();

      if (expected != calculated) {
        long errPos = chunkPos + verifyOff;
        throw new ChecksumException(
          "Checksum error: "+file+" at "+ errPos +
          " exp: " + expected + " got: " + calculated, errPos);
      }
      leftToVerify -= maxChunkSize;
      verifyOff += maxChunkSize;
    }
  }

  /**
   * Convert a checksum byte array to a long
   * This is deprecated since 0.22 since it is no longer in use
   * by this class.
   *
   * @param checksum check sum.
   * @return crc.
   */
  @Deprecated
  static public long checksum2long(byte[] checksum) {

View on GitHub (pinned to 2add963021)

Solutions

  1. Re-read the file; a persistent checksum error indicates data corruption on disk or in transit.
  2. Restore the file from a replica or backup.
  3. Check storage hardware/logs for the DataNode or local disk hosting ${file}.

When it happens

Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputChecker.java:352 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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