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
ConstructorsConstructorDescriptionIcebergTableLocationProviderBase(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 TableLocationmakeTableLocation(@NotNull TableLocationKey locationKey) Make a new implementation-appropriate TableLocation from the supplied key.protected voidRefresh the table location provider with the latest snapshot from the catalog.abstract voidupdate()Update a manually refreshing table location provider with the latest snapshot from the catalog.abstract voidupdate(long snapshotId) Update a manually refreshing table location provider with a specific snapshot from the catalog.abstract voidupdate(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, visitLocationKeyMethods inherited from class io.deephaven.engine.table.impl.locations.impl.SubscriptionAggregator
activateUnderlyingDataSource, activationFailed, activationSuccessful, checkHasSubscribers, deactivateUnderlyingDataSource, matchSubscriptionToken, postActivationHook, subscribe, supportsSubscriptions, unsubscribeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.util.type.NamedImplementation
getImplementationNameMethods 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 anUnsupportedOperationExceptionif 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 thesnapshotIdis not found in the list of snapshots for the table, anIllegalArgumentExceptionis thrown. The input snapshot must also be newer (higher in sequence number) than the current snapshot or anIllegalArgumentExceptionis thrown. This will throw anUnsupportedOperationExceptionif 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 anIllegalArgumentExceptionis thrown. This will throw anUnsupportedOperationExceptionif 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:AbstractTableLocationProviderMake a new implementation-appropriate TableLocation from the supplied key.- Specified by:
makeTableLocationin 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.
-