protected void verifyFileIntegrity(byte[] persistentChecksum, String algorithm)
    throws IOException {
    byte[] calculateChecksum = calculateChecksum(algorithm);
    if (!Bytes.equals(persistentChecksum, calculateChecksum)) {
      throw new IOException(
        "Mismatch of checksum! The persistent checksum is " + Bytes.toString(persistentChecksum)
          + ", but the calculate checksum is " + Bytes.toString(calculateChecksum));
    }
  }
Verify cache files's integrity
@param algorithm the backingMap persistence path
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/PersistentIOEngine.java