Package io.deephaven.iceberg.layout
Class IcebergStaticTableLocationProvider<TK extends TableKey,TLK extends TableLocationKey>
java.lang.Object
io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator<TableLocationProvider.Listener>
io.deephaven.engine.table.impl.locations.impl.AbstractTableLocationProvider
io.deephaven.iceberg.layout.IcebergTableLocationProviderBase<TK,TLK>
io.deephaven.iceberg.layout.IcebergStaticTableLocationProvider<TK,TLK>
- All Implemented Interfaces:
TableLocationProvider
,NamedImplementation
public class IcebergStaticTableLocationProvider<TK extends TableKey,TLK extends TableLocationKey>
extends IcebergTableLocationProviderBase<TK,TLK>
Static TableLocationProvider
implementation that delegates location key
discovery to
a TableLocationKeyFinder
and location
creation to a TableLocationFactory
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.locations.TableLocationProvider
TableLocationProvider.Listener
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
subscriptions
-
Constructor Summary
ConstructorDescriptionIcebergStaticTableLocationProvider
(TK tableKey, @NotNull IcebergBaseLayout locationKeyFinder, @NotNull TableLocationFactory<TK, TLK> locationFactory, @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Initialization method for subclasses to override, in case simply callingTableLocationProvider.refresh()
is inappropriate.Get a name for the implementing class.void
refresh()
Initialize or refresh state information about the list of existing locations.void
update()
Update a manually refreshing table location provider with the latest snapshot from the catalog.void
update
(long snapshotId) Update a manually refreshing table location provider with a specific snapshot from the catalog.void
update
(org.apache.iceberg.Snapshot snapshot) Update a manually refreshing table location provider with a specific snapshot from the catalog.Methods inherited from class io.deephaven.iceberg.layout.IcebergTableLocationProviderBase
makeTableLocation, refreshLocations
Methods inherited from class io.deephaven.engine.table.impl.locations.impl.AbstractTableLocationProvider
beginTransaction, deliverInitialSnapshot, endTransaction, ensureInitialized, getKey, getLocationUpdateMode, getTableLocationIfPresent, getTableLocationKeys, getUpdateMode, handleTableLocationKeyAdded, handleTableLocationKeyAdded, handleTableLocationKeyRemoved, hasTableLocationKey, isInitialized, removeTableLocationKey, setInitialized, toString, visitLocationKey
Methods inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
activateUnderlyingDataSource, activationFailed, activationSuccessful, checkHasSubscribers, deactivateUnderlyingDataSource, matchSubscriptionToken, postActivationHook, subscribe, supportsSubscriptions, unsubscribe
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocationProvider
getName, getTableLocation, getTableLocationKeys, getTableLocationKeys, subscribe, supportsSubscriptions, unsubscribe
-
Constructor Details
-
IcebergStaticTableLocationProvider
public IcebergStaticTableLocationProvider(@NotNull TK tableKey, @NotNull @NotNull IcebergBaseLayout locationKeyFinder, @NotNull @NotNull TableLocationFactory<TK, TLK> locationFactory, @NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
-
-
Method Details
-
getImplementationName
Description copied from interface:NamedImplementation
Get a name for the implementing class. Useful for abstract classes that implement
LogOutputAppendable
or overridetoString
.The default implementation is correct, but not suitable for high-frequency usage.
- Returns:
- A name for the implementing class
-
doInitialization
protected void doInitialization()Description copied from class:AbstractTableLocationProvider
Initialization method for subclasses to override, in case simply callingTableLocationProvider.refresh()
is inappropriate. This is *not* guaranteed to be called only once. It should internally callAbstractTableLocationProvider.setInitialized()
upon successful initialization.- Overrides:
doInitialization
in classAbstractTableLocationProvider
-
refresh
public void refresh()Description copied from interface:TableLocationProvider
Initialize or refresh state information about the list of existing locations. -
update
public void update()Description copied from class:IcebergTableLocationProviderBase
Update a manually refreshing table location provider with the latest snapshot from the catalog. This will throw anUnsupportedOperationException
if the table is not manually refreshing.- Specified by:
update
in classIcebergTableLocationProviderBase<TK extends TableKey,
TLK extends TableLocationKey>
-
update
public void update(long snapshotId) Description copied from class:IcebergTableLocationProviderBase
Update a manually refreshing table location provider with a specific snapshot from the catalog. If thesnapshotId
is not found in the list of snapshots for the table, anIllegalArgumentException
is thrown. The input snapshot must also be newer (higher in sequence number) than the current snapshot or anIllegalArgumentException
is thrown. This will throw anUnsupportedOperationException
if the table is not manually refreshing.- Specified by:
update
in classIcebergTableLocationProviderBase<TK extends TableKey,
TLK extends TableLocationKey> - Parameters:
snapshotId
- The identifier of the snapshot to use when updating the table.
-
update
public void update(org.apache.iceberg.Snapshot snapshot) Description copied from class:IcebergTableLocationProviderBase
Update a manually refreshing table location provider with a specific snapshot from the catalog. The input snapshot must be newer (higher in sequence number) than the current snapshot or anIllegalArgumentException
is thrown. This will throw anUnsupportedOperationException
if the table is not manually refreshing.- Specified by:
update
in classIcebergTableLocationProviderBase<TK extends TableKey,
TLK extends TableLocationKey> - Parameters:
snapshot
- The snapshot to use when updating the table.
-