Package io.deephaven.iceberg.layout
Class IcebergBaseLayout
java.lang.Object
io.deephaven.iceberg.layout.IcebergBaseLayout
- All Implemented Interfaces:
TableLocationKeyFinder<IcebergTableLocationKey>
- Direct Known Subclasses:
IcebergFlatLayout
,IcebergKeyValuePartitionedLayout
public abstract class IcebergBaseLayout
extends Object
implements TableLocationKeyFinder<IcebergTableLocationKey>
-
Constructor Summary
ConstructorDescriptionIcebergBaseLayout
(@NotNull IcebergTableAdapter tableAdapter, @NotNull IcebergReadInstructions instructions, @NotNull DataInstructionsProviderLoader dataInstructionsProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
findKeys
(@NotNull Consumer<IcebergTableLocationKey> locationKeyObserver) Findkeys
and deliver them to thelocationKeyObserver
.protected IcebergTableLocationKey
locationKey
(@NotNull org.apache.iceberg.ManifestFile manifestFile, @NotNull org.apache.iceberg.DataFile dataFile, @NotNull URI fileUri, @Nullable Map<String, Comparable<?>> partitions) protected boolean
Update the snapshot to the latest snapshot from the catalog ifprotected void
updateSnapshot
(long snapshotId) Update the snapshot to the user specified snapshot.protected void
updateSnapshot
(@NotNull org.apache.iceberg.Snapshot updateSnapshot) Update the snapshot to the user specified snapshot.
-
Constructor Details
-
IcebergBaseLayout
public IcebergBaseLayout(@NotNull @NotNull IcebergTableAdapter tableAdapter, @NotNull @NotNull IcebergReadInstructions instructions, @NotNull @NotNull DataInstructionsProviderLoader dataInstructionsProvider) - Parameters:
tableAdapter
- TheIcebergTableAdapter
that will be used to access the table.instructions
- The instructions for customizations while reading.
-
-
Method Details
-
locationKey
protected IcebergTableLocationKey locationKey(@NotNull @NotNull org.apache.iceberg.ManifestFile manifestFile, @NotNull @NotNull org.apache.iceberg.DataFile dataFile, @NotNull @NotNull URI fileUri, @Nullable @Nullable Map<String, Comparable<?>> partitions) - Parameters:
manifestFile
- The manifest file from which the data file was discovereddataFile
- The data file that backs the keyed locationfileUri
- TheURI
for the file that backs the keyed locationpartitions
- The table partitions enclosing the table location keyed by the returned key. Ifnull
, the location will be a member of no partitions.- Returns:
- A new
IcebergTableLocationKey
-
findKeys
Description copied from interface:TableLocationKeyFinder
Findkeys
and deliver them to thelocationKeyObserver
.- Specified by:
findKeys
in interfaceTableLocationKeyFinder<IcebergTableLocationKey>
- Parameters:
locationKeyObserver
- Per-key callback
-
maybeUpdateSnapshot
protected boolean maybeUpdateSnapshot()Update the snapshot to the latest snapshot from the catalog if -
updateSnapshot
protected void updateSnapshot(long snapshotId) Update the snapshot to the user specified snapshot. SeeIcebergTable.update(long)
for more details. -
updateSnapshot
protected void updateSnapshot(@NotNull @NotNull org.apache.iceberg.Snapshot updateSnapshot) Update the snapshot to the user specified snapshot. SeeIcebergTable.update(Snapshot)
for more details.
-