Class ChecksumUtils

Object
io.delta.kernel.internal.checksum.ChecksumUtils

public class ChecksumUtils extends Object
Utility methods for computing and writing checksums for Delta tables.
  • Method Details

    • computeStateAndWriteChecksum

      public static void computeStateAndWriteChecksum(Engine engine, LogSegment logSegmentAtVersion) throws IOException
      Computes the state of a Delta table and writes a checksum file for the provided snapshot's version. If a checksum file already exists for this version, this method returns without any changes.

      The checksum file contains table statistics including:

      • Total table size in bytes
      • Total number of files
      • File size histogram
      • Domain metadata information

      Note: For very large tables, this operation may be expensive as it requires scanning the table state to compute statistics.

      Parameters:
      engine - The Engine instance used to access the underlying storage
      logSegmentAtVersion - The LogSegment instance of the table at a specific version
      Throws:
      IOException - If an I/O error occurs during checksum computation or writing