Interface Snapshot
- 
- All Superinterfaces:
- java.io.Serializable
 
 public interface Snapshot extends java.io.SerializableA snapshot of the data in a table at a point in time.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 AppendFilesandRewriteFiles.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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 allManifestFileinstances for either data or delete manifests in this snapshot.java.util.List<ManifestFile>dataManifests(FileIO io)Return aManifestFilefor each data manifest in this snapshot.java.util.List<ManifestFile>deleteManifests(FileIO io)Return aManifestFilefor each delete manifest in this snapshot.java.lang.StringmanifestListLocation()Return the location of this snapshot's manifest list, or null if it is not separate.java.lang.Stringoperation()Return the name of thedata operationthat produced this snapshot.java.lang.LongparentId()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.IntegerschemaId()Return the id of the schema used when this snapshot was created, or null if this information is not available.longsequenceNumber()Return this snapshot's sequence number.longsnapshotId()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.longtimestampMillis()Return this snapshot's timestamp.
 
- 
- 
- 
Method Detail- 
sequenceNumberlong sequenceNumber() Return this snapshot's sequence number.Sequence numbers are assigned when a snapshot is committed. - Returns:
- a long sequence number
 
 - 
snapshotIdlong snapshotId() Return this snapshot's ID.- Returns:
- a long ID
 
 - 
parentIdjava.lang.Long parentId() Return this snapshot's parent ID or null.- Returns:
- a long ID for this snapshot's parent, or null if it has no parent
 
 - 
timestampMillislong timestampMillis() Return this snapshot's timestamp.This timestamp is the same as those produced by System.currentTimeMillis().- Returns:
- a long timestamp in milliseconds
 
 - 
allManifestsjava.util.List<ManifestFile> allManifests(FileIO io) Return allManifestFileinstances for either data or delete manifests in this snapshot.- Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- a list of ManifestFile
 
 - 
dataManifestsjava.util.List<ManifestFile> dataManifests(FileIO io) Return aManifestFilefor each data manifest in this snapshot.- Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- a list of ManifestFile
 
 - 
deleteManifestsjava.util.List<ManifestFile> deleteManifests(FileIO io) Return aManifestFilefor each delete manifest in this snapshot.- Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- a list of ManifestFile
 
 - 
operationjava.lang.String operation() Return the name of thedata operationthat produced this snapshot.- Returns:
- the operation that produced this snapshot, or null if the operation is unknown
- See Also:
- DataOperations
 
 - 
summaryjava.util.Map<java.lang.String,java.lang.String> summary() Return a string map of summary data for the operation that produced this snapshot.- Returns:
- a string map of summary data.
 
 - 
addedDataFilesjava.lang.Iterable<DataFile> addedDataFiles(FileIO io) Return all data files added to the table in this snapshot.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. - Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- all data files added to the table in this snapshot.
 
 - 
removedDataFilesjava.lang.Iterable<DataFile> removedDataFiles(FileIO io) Return all data files removed from the table in this snapshot.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. - Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- all data files removed from the table in this snapshot.
 
 - 
addedDeleteFilesdefault java.lang.Iterable<DeleteFile> addedDeleteFiles(FileIO io) Return all delete files added to the table in this snapshot.The files returned include the following columns: file_path, file_format, partition, record_count, and file_size_in_bytes. Other columns will be null. - Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- all delete files added to the table in this snapshot
 
 - 
removedDeleteFilesdefault java.lang.Iterable<DeleteFile> removedDeleteFiles(FileIO io) Return all delete files removed from the table in this snapshot.The files returned include the following columns: file_path, file_format, partition, record_count, and file_size_in_bytes. Other columns will be null. - Parameters:
- io- a- FileIOinstance used for reading files from storage
- Returns:
- all delete files removed from the table in this snapshot
 
 - 
manifestListLocationjava.lang.String manifestListLocation() Return the location of this snapshot's manifest list, or null if it is not separate.- Returns:
- the location of the manifest list for this Snapshot
 
 - 
schemaIddefault java.lang.Integer schemaId() Return the id of the schema used when this snapshot was created, or null if this information is not available.- Returns:
- schema id associated with this snapshot
 
 
- 
 
-