public interface Snapshot
extends java.io.Serializable
A snapshot consist of one or more file manifests, and the complete table contents is the union of all the data files in those manifests.
Snapshots are created by table operations, like AppendFiles
and RewriteFiles
.
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<DataFile> |
addedDataFiles(FileIO io)
Return all data files added to the table in this snapshot.
|
default java.lang.Iterable<DeleteFile> |
addedDeleteFiles(FileIO io)
Return all delete files added to the table in this snapshot.
|
java.util.List<ManifestFile> |
allManifests(FileIO io)
Return all
ManifestFile instances for either data or delete manifests in this snapshot. |
java.util.List<ManifestFile> |
dataManifests(FileIO io)
Return a
ManifestFile for each data manifest in this snapshot. |
java.util.List<ManifestFile> |
deleteManifests(FileIO io)
Return a
ManifestFile for each delete manifest in this snapshot. |
java.lang.String |
manifestListLocation()
Return the location of this snapshot's manifest list, or null if it is not separate.
|
java.lang.String |
operation()
Return the name of the
data operation that produced this snapshot. |
java.lang.Long |
parentId()
Return this snapshot's parent ID or null.
|
java.lang.Iterable<DataFile> |
removedDataFiles(FileIO io)
Return all data files removed from the table in this snapshot.
|
default java.lang.Iterable<DeleteFile> |
removedDeleteFiles(FileIO io)
Return all delete files removed from the table in this snapshot.
|
default java.lang.Integer |
schemaId()
Return the id of the schema used when this snapshot was created, or null if this information is
not available.
|
long |
sequenceNumber()
Return this snapshot's sequence number.
|
long |
snapshotId()
Return this snapshot's ID.
|
java.util.Map<java.lang.String,java.lang.String> |
summary()
Return a string map of summary data for the operation that produced this snapshot.
|
long |
timestampMillis()
Return this snapshot's timestamp.
|
long sequenceNumber()
Sequence numbers are assigned when a snapshot is committed.
long snapshotId()
java.lang.Long parentId()
long timestampMillis()
This timestamp is the same as those produced by System.currentTimeMillis()
.
java.util.List<ManifestFile> allManifests(FileIO io)
ManifestFile
instances for either data or delete manifests in this snapshot.io
- a FileIO
instance used for reading files from storagejava.util.List<ManifestFile> dataManifests(FileIO io)
ManifestFile
for each data manifest in this snapshot.io
- a FileIO
instance used for reading files from storagejava.util.List<ManifestFile> deleteManifests(FileIO io)
ManifestFile
for each delete manifest in this snapshot.io
- a FileIO
instance used for reading files from storagejava.lang.String operation()
data operation
that produced this snapshot.DataOperations
java.util.Map<java.lang.String,java.lang.String> summary()
java.lang.Iterable<DataFile> addedDataFiles(FileIO io)
The files returned include the following columns: file_path, file_format, partition, record_count, and file_size_in_bytes. Data and file sequence number are populated. Other columns will be null.
io
- a FileIO
instance used for reading files from storagejava.lang.Iterable<DataFile> removedDataFiles(FileIO io)
The files returned include the following columns: file_path, file_format, partition, record_count, and file_size_in_bytes. Data and file sequence number are populated. Other columns will be null.
io
- a FileIO
instance used for reading files from storagedefault java.lang.Iterable<DeleteFile> addedDeleteFiles(FileIO io)
The files returned include the following columns: file_path, file_format, partition, record_count, and file_size_in_bytes. Other columns will be null.
io
- a FileIO
instance used for reading files from storagedefault java.lang.Iterable<DeleteFile> removedDeleteFiles(FileIO io)
The files returned include the following columns: file_path, file_format, partition, record_count, and file_size_in_bytes. Other columns will be null.
io
- a FileIO
instance used for reading files from storagejava.lang.String manifestListLocation()
default java.lang.Integer schemaId()