Package io.deephaven.iceberg.layout
Class IcebergTableLocationProviderBase<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>
- All Implemented Interfaces:
TableLocationProvider
,NamedImplementation
- Direct Known Subclasses:
IcebergAutoRefreshTableLocationProvider
,IcebergManualRefreshTableLocationProvider
,IcebergStaticTableLocationProvider
public abstract class IcebergTableLocationProviderBase<TK extends TableKey,TLK extends TableLocationKey>
extends AbstractTableLocationProvider
-
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
ConstructorDescriptionIcebergTableLocationProviderBase
(TK tableKey, @NotNull IcebergBaseLayout locationKeyFinder, @NotNull TableLocationFactory<TK, TLK> locationFactory, boolean isRefreshing, @Nullable IcebergTableAdapter adapter, @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, TableUpdateMode updateMode, TableUpdateMode locationUpdateMode) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull TableLocation
makeTableLocation
(@NotNull TableLocationKey locationKey) Make a new implementation-appropriate TableLocation from the supplied key.protected void
Refresh the table location provider with the latest snapshot from the catalog.abstract void
update()
Update a manually refreshing table location provider with the latest snapshot from the catalog.abstract void
update
(long snapshotId) Update a manually refreshing table location provider with a specific snapshot from the catalog.abstract 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.engine.table.impl.locations.impl.AbstractTableLocationProvider
beginTransaction, deliverInitialSnapshot, doInitialization, 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.util.type.NamedImplementation
getImplementationName
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocationProvider
getName, getTableLocation, getTableLocationKeys, getTableLocationKeys, refresh, subscribe, supportsSubscriptions, unsubscribe
-
Constructor Details
-
IcebergTableLocationProviderBase
public IcebergTableLocationProviderBase(@NotNull TK tableKey, @NotNull @NotNull IcebergBaseLayout locationKeyFinder, @NotNull @NotNull TableLocationFactory<TK, TLK> locationFactory, boolean isRefreshing, @Nullable @Nullable IcebergTableAdapter adapter, @NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, TableUpdateMode updateMode, TableUpdateMode locationUpdateMode)
-
-
Method Details
-
update
public abstract void update()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. -
update
public abstract void update(long snapshotId) 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.- Parameters:
snapshotId
- The identifier of the snapshot to use when updating the table.
-
update
public abstract void update(org.apache.iceberg.Snapshot snapshot) 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.- Parameters:
snapshot
- The snapshot to use when updating the table.
-
makeTableLocation
@NotNull protected @NotNull TableLocation makeTableLocation(@NotNull @NotNull TableLocationKey locationKey) Description copied from class:AbstractTableLocationProvider
Make a new implementation-appropriate TableLocation from the supplied key.- Specified by:
makeTableLocation
in classAbstractTableLocationProvider
- Parameters:
locationKey
- The table location key- Returns:
- The new TableLocation
-
refreshLocations
protected void refreshLocations()Refresh the table location provider with the latest snapshot from the catalog. This method will identify new locations and removed locations.
-