Class HybridSnapshotBackedTableLocation<REAL_LOCATION_TYPE extends AbstractTableLocation>
java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
io.deephaven.engine.liveness.ReferenceCountedLivenessNode
io.deephaven.enterprise.locations.local.HybridSnapshotBackedTableLocation<REAL_LOCATION_TYPE>
- Type Parameters:
REAL_LOCATION_TYPE
- the type of the real location, which must extend AbstractTableLocation
- All Implemented Interfaces:
LogOutputAppendable
,LivenessManager
,LivenessNode
,LivenessReferent
,TableLocation
,TableLocationState
,NamedImplementation
public class HybridSnapshotBackedTableLocation<REAL_LOCATION_TYPE extends AbstractTableLocation>
extends ReferenceCountedLivenessNode
implements TableLocation
A
TableLocation
backed by a TableLocationMetadataIndex.LocationSnapshot
that does not refresh and
tries to avoid creating the actual location until it is truly needed.
Subscriptions are not supported.
The distinction between the HybridSnapshotBackedTableLocation and the SnapshotBackedTableLocation
is that for
the hybrid version we may not have the rowset available from the snapshot. If the rowset is unavailable (null), then
must realize the real location to return the rowset. This has the effect of requiring the Parquet file to be read to
determine how many row groups there are upon the table .coalesce() operation. When only the size is needed (e.g. to
just discover the locations and understand they are non-empty), a snapshot without the row group information is
sufficient.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.locations.TableLocation
TableLocation.Listener
-
Field Summary
Fields inherited from interface io.deephaven.engine.table.impl.locations.TableLocationState
NULL_SIZE, NULL_TIME
-
Constructor Summary
ConstructorsConstructorDescriptionHybridSnapshotBackedTableLocation
(@NotNull TableKey tableKey, @NotNull TableLocationKey tableLocationKey, io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.local.TableLocationMetadataIndex.LocationSnapshot snapshot, @NotNull Supplier<REAL_LOCATION_TYPE> locationFactory) -
Method Summary
Modifier and TypeMethodDescription@NotNull ColumnLocation
getColumnLocation
(@NotNull CharSequence name) @Nullable BasicDataIndex
getDataIndex
(@NotNull String... columns) @NotNull ImmutableTableLocationKey
getKey()
long
long
getSize()
@NotNull List<SortColumn>
@NotNull Object
@NotNull ImmutableTableKey
boolean
hasDataIndex
(@NotNull String... columns) void
refresh()
void
subscribe
(TableLocation.Listener listener) boolean
void
unsubscribe
(TableLocation.Listener listener) Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanage
Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReference
Methods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanage
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
Methods inherited from interface io.deephaven.util.type.NamedImplementation
getImplementationName
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocation
append, toGenericString, toStringDetailed, toStringHelper
Methods inherited from interface io.deephaven.engine.table.impl.locations.TableLocationState
copyStateValuesTo
-
Constructor Details
-
HybridSnapshotBackedTableLocation
public HybridSnapshotBackedTableLocation(@NotNull @NotNull TableKey tableKey, @NotNull @NotNull TableLocationKey tableLocationKey, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.v2.locations.local.TableLocationMetadataIndex.LocationSnapshot snapshot, @NotNull @NotNull Supplier<REAL_LOCATION_TYPE> locationFactory) - Parameters:
tableKey
- Table key for the table this location belongs totableLocationKey
- Table location key that identifies this location
-
-
Method Details
-
getTableKey
- Specified by:
getTableKey
in interfaceTableLocation
-
getKey
- Specified by:
getKey
in interfaceTableLocation
-
supportsSubscriptions
public boolean supportsSubscriptions()- Specified by:
supportsSubscriptions
in interfaceTableLocation
-
subscribe
- Specified by:
subscribe
in interfaceTableLocation
-
unsubscribe
- Specified by:
unsubscribe
in interfaceTableLocation
-
refresh
public void refresh()- Specified by:
refresh
in interfaceTableLocation
-
getSortedColumns
- Specified by:
getSortedColumns
in interfaceTableLocation
-
getDataIndexColumns
- Specified by:
getDataIndexColumns
in interfaceTableLocation
-
hasDataIndex
- Specified by:
hasDataIndex
in interfaceTableLocation
-
getDataIndex
- Specified by:
getDataIndex
in interfaceTableLocation
-
getColumnLocation
- Specified by:
getColumnLocation
in interfaceTableLocation
-
getStateLock
- Specified by:
getStateLock
in interfaceTableLocationState
-
getRowSet
- Specified by:
getRowSet
in interfaceTableLocationState
-
getSize
public long getSize()- Specified by:
getSize
in interfaceTableLocationState
-
getLastModifiedTimeMillis
public long getLastModifiedTimeMillis()- Specified by:
getLastModifiedTimeMillis
in interfaceTableLocationState
-