| Constructor and Description |
|---|
SnapshotImpl(Path dataPath,
LogSegment logSegment,
LogReplay logReplay,
Protocol protocol,
Metadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
CreateCheckpointIterator |
getCreateCheckpointIterator(Engine engine) |
Path |
getDataPath() |
java.util.Map<String,DomainMetadata> |
getDomainMetadataMap()
Get the domain metadata map from the log replay, which lazily loads and replays a history of
domain metadata actions, resolving them to produce the current state of the domain metadata.
|
java.util.Optional<Long> |
getLatestTransactionVersion(Engine engine,
String applicationId)
Get the latest transaction version for given applicationId.
|
Path |
getLogPath() |
LogSegment |
getLogSegment() |
Metadata |
getMetadata() |
java.util.List<String> |
getPartitionColumnNames(Engine engine)
Get the names of the partition columns in the Delta table at this snapshot.
|
Protocol |
getProtocol() |
ScanBuilder |
getScanBuilder(Engine engine)
Create a scan builder to construct a
Scan to read data from this snapshot. |
StructType |
getSchema(Engine engine)
Get the schema of the table at this snapshot.
|
java.util.Optional<TableCommitCoordinatorClientHandler> |
getTableCommitCoordinatorClientHandlerOpt(Engine engine)
Returns the commit coordinator client handler based on the table metadata in this snapshot.
|
long |
getTimestamp(Engine engine)
Get the timestamp (in milliseconds since the Unix epoch) of the latest commit in this Snapshot.
|
long |
getVersion(Engine engine)
Get the version of this snapshot in the table.
|
public SnapshotImpl(Path dataPath, LogSegment logSegment, LogReplay logReplay, Protocol protocol, Metadata metadata)
public long getVersion(Engine engine)
SnapshotgetVersion in interface Snapshotengine - Engine instance to use in Delta Kernel.public long getTimestamp(Engine engine)
When InCommitTimestampTableFeature is enabled, the timestamp is retrieved from the CommitInfo of the latest commit in this Snapshot, which can result in an IO operation.
For non-ICT tables, this is the same as the file modification time of the latest commit in this Snapshot.
getTimestamp in interface Snapshotengine - the engine to use for IO operationspublic StructType getSchema(Engine engine)
Snapshotpublic ScanBuilder getScanBuilder(Engine engine)
SnapshotScan to read data from this snapshot.getScanBuilder in interface Snapshotengine - Engine instance to use in Delta Kernel.ScanBuilderpublic Path getLogPath()
public Path getDataPath()
public Protocol getProtocol()
public java.util.List<String> getPartitionColumnNames(Engine engine)
SnapshotThe partition column names are returned in the order they are defined in the Delta table schema. If the table does not define any partition columns, this method returns an empty list.
getPartitionColumnNames in interface Snapshotengine - Engine instance to use in Delta Kernel.public java.util.Map<String,DomainMetadata> getDomainMetadataMap()
DomainMetadata
objects.public Metadata getMetadata()
public LogSegment getLogSegment()
public CreateCheckpointIterator getCreateCheckpointIterator(Engine engine)
public java.util.Optional<Long> getLatestTransactionVersion(Engine engine, String applicationId)
applicationId - Identifier of the application that put transaction identifiers in Delta
transaction logOptional.empty() if no transaction identifier
exists for this application.public java.util.Optional<TableCommitCoordinatorClientHandler> getTableCommitCoordinatorClientHandlerOpt(Engine engine)
engine - the engine to use for IO operations