Interface Snapshot
- All Superinterfaces:
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
.
-
Method Summary
Modifier and TypeMethodDescriptionaddedDataFiles
(FileIO io) Return all data files added to the table in this snapshot.default Iterable
<DeleteFile> Return all delete files added to the table in this snapshot.allManifests
(FileIO io) Return allManifestFile
instances for either data or delete manifests in this snapshot.dataManifests
(FileIO io) Return aManifestFile
for each data manifest in this snapshot.Return aManifestFile
for each delete manifest in this snapshot.Return the location of this snapshot's manifest list, or null if it is not separate.Return the name of thedata operation
that produced this snapshot.parentId()
Return this snapshot's parent ID or null.Return all data files removed from the table in this snapshot.default Iterable
<DeleteFile> Return all delete files removed from the table in this snapshot.default Integer
schemaId()
Return the id of the schema used when this snapshot was created, or null if this information is not available.long
Return this snapshot's sequence number.long
Return this snapshot's ID.summary()
Return a string map of summary data for the operation that produced this snapshot.long
Return this snapshot's timestamp.
-
Method Details
-
sequenceNumber
long sequenceNumber()Return this snapshot's sequence number.Sequence numbers are assigned when a snapshot is committed.
- Returns:
- a long sequence number
-
snapshotId
long snapshotId()Return this snapshot's ID.- Returns:
- a long ID
-
parentId
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
-
timestampMillis
long timestampMillis()Return this snapshot's timestamp.This timestamp is the same as those produced by
System.currentTimeMillis()
.- Returns:
- a long timestamp in milliseconds
-
allManifests
Return allManifestFile
instances for either data or delete manifests in this snapshot.- Parameters:
io
- aFileIO
instance used for reading files from storage- Returns:
- a list of ManifestFile
-
dataManifests
Return aManifestFile
for each data manifest in this snapshot.- Parameters:
io
- aFileIO
instance used for reading files from storage- Returns:
- a list of ManifestFile
-
deleteManifests
Return aManifestFile
for each delete manifest in this snapshot.- Parameters:
io
- aFileIO
instance used for reading files from storage- Returns:
- a list of ManifestFile
-
operation
String operation()Return the name of thedata operation
that produced this snapshot.- Returns:
- the operation that produced this snapshot, or null if the operation is unknown
- See Also:
-
summary
Return a string map of summary data for the operation that produced this snapshot.- Returns:
- a string map of summary data.
-
addedDataFiles
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
- aFileIO
instance used for reading files from storage- Returns:
- all data files added to the table in this snapshot.
-
removedDataFiles
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
- aFileIO
instance used for reading files from storage- Returns:
- all data files removed from the table in this snapshot.
-
addedDeleteFiles
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
- aFileIO
instance used for reading files from storage- Returns:
- all delete files added to the table in this snapshot
-
removedDeleteFiles
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
- aFileIO
instance used for reading files from storage- Returns:
- all delete files removed from the table in this snapshot
-
manifestListLocation
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
-
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
-