This documentation is for an unreleased version of Apache Paimon. We recommend you use the latest stable version.
Snapshot
Snapshot #
Each commit generates a snapshot file, and the version of the snapshot file starts from 1 and must be continuous.
EARLIEST
and LATEST
are hint files at the beginning and end of the snapshot list, and they can be inaccurate.
When hint files are inaccurate, the read will scan all snapshot files to determine the beginning and end.
warehouse
└── default.db
└── my_table
├── snapshot
├── EARLIEST
├── LATEST
├── snapshot-1
├── snapshot-2
└── snapshot-3
Writing commit will preempt the next snapshot id, and once the snapshot file is successfully written, this commit will be visible.
Snapshot File is JSON, it includes:
- version: Snapshot file version, current is 3.
- id: snapshot id, same to file name.
- schemaId: the corresponding schema version for this commit.
- baseManifestList: a manifest list recording all changes from the previous snapshots.
- deltaManifestList: a manifest list recording all new changes occurred in this snapshot.
- changelogManifestList: a manifest list recording all changelog produced in this snapshot, null if no changelog is produced.
- indexManifest: a manifest recording all index files of this table, null if no table index file.
- commitUser: usually generated by UUID, it is used for recovery of streaming writes, one stream write job with one user.
- commitIdentifier: transaction id corresponding to streaming write, each transaction may result in multiple commits for different commitKinds.
- commitKind: type of changes in this snapshot, including append, compact, overwrite and analyze.
- timeMillis: commit time millis.
- totalRecordCount: record count of all changes occurred in this snapshot.
- deltaRecordCount: record count of all new changes occurred in this snapshot.
- changelogRecordCount: record count of all changelog produced in this snapshot.
- watermark: watermark for input records, from Flink watermark mechanism, Long.MIN_VALUE if there is no watermark.
- statistics: stats file name for statistics of this table.