Class BaseIncrementalReleaseFilter
- All Implemented Interfaces:
ConcurrencyControl<Filter>,Expression,Filter,LogOutputAppendable,LivenessManager,LivenessNode,LivenessReferent,WhereFilter,NotificationQueue.Dependency,Serializable,Runnable
- Direct Known Subclasses:
AutoTuningIncrementalReleaseFilter,IncrementalReleaseFilter
The use case is for benchmarks that want to replay a table in order to better understand incremental processing capacity.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
WhereFilter.PreviousFilteringNotSupported, WhereFilter.RecomputeListener, WhereFilter.Visitor<T> -
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.select.WhereFilterLivenessArtifactImpl
updateGraphFields inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
ZERO_LENGTH_WHERE_FILTER_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionprotected voidIf this filter is not part of the update graph's sources, then add it.copy()Create a copy of this WhereFilter.protected voiddestroy()Attempt to release (destructively when necessary) resources held by this object.longHow many nanos between the first release event and the final release event?@NotNull WritableRowSetFilter selection to only matching rows.Get the array columns required by this select filter.Get the columns required by this select filter.longlongvoidinit(@NotNull TableDefinition tableDefinition) Initialize this filter given the table definition.booleanIs this filter refreshing?booleanbooleanReturns true if this filter permits parallelism.protected voidremoveFromUpdateGraph(@NotNull Table table) If this filter is part of the update graph's sources, then remove it.voidrun()booleansatisfied(long step) Is this ancestor satisfied? Note that this method must be safe to call on any thread.voidSet theWhereFilter.RecomputeListenerthat should be notified if results based on this WhereFilter must be recomputed.voidstart()Begin releasing rows during update propagation.voidWait for all rows to be released.voidwaitForCompletion(long timeoutMillis) Wait for all rows to be released.Methods inherited from class io.deephaven.engine.table.impl.select.WhereFilterLivenessArtifactImpl
isAutomatedFilter, setAutomatedFilterMethods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScopeMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanageMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReferenceMethods inherited from interface io.deephaven.base.log.LogOutputAppendable
appendMethods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraphMethods inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
beginOperation, canMemoize, filter, filterInverse, hasVirtualRowVariables, init, invert, isSerial, validateSafeForRefresh, walk, walk, walk, withDeclaredBarriers, withRespectedBarriers, withSerial
-
Method Details
-
getColumns
Description copied from interface:WhereFilterGet the columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumnsin interfaceWhereFilter- Returns:
- the columns used as input by this select filter.
-
getColumnArrays
Description copied from interface:WhereFilterGet the array columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumnArraysin interfaceWhereFilter- Returns:
- the columns used as array input by this select filter.
-
init
Description copied from interface:WhereFilterInitialize this filter given the table definition. If this filter has already been initialized, this should be a no-op, or optionally validate that the table definition is compatible with previous initialization.- Specified by:
initin interfaceWhereFilter- Parameters:
tableDefinition- the definition of the table that will be filtered
-
addToUpdateGraph
protected void addToUpdateGraph()If this filter is not part of the update graph's sources, then add it. -
removeFromUpdateGraph
If this filter is part of the update graph's sources, then remove it.Additionally, if the table we are filtering is not refreshing; we drop the reference to our recompute listener. The reference to the recompute listener is dropped, because there are never going to be any more rows to add to the result table.
-
filter
@NotNull public @NotNull WritableRowSet filter(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev) Description copied from interface:WhereFilterFilter selection to only matching rows.- Specified by:
filterin interfaceWhereFilter- Parameters:
selection- the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate orcloseselection.fullSet- the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate orclosefullSet.table- the table to filterusePrev- true if previous values should be used. Implementing previous value filtering is optional, and aWhereFilter.PreviousFilteringNotSupportedexception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.- Returns:
- The subset of selection accepted by this filter; ownership passes to the caller
-
waitForCompletion
Wait for all rows to be released.- Throws:
InterruptedException
-
waitForCompletion
Wait for all rows to be released.- Throws:
InterruptedException
-
durationNanos
How many nanos between the first release event and the final release event?- Returns:
- nano duration of this filter, or NULL_LONG if the filter is not completed
-
start
public void start()Begin releasing rows during update propagation. -
satisfied
public boolean satisfied(long step) Description copied from interface:NotificationQueue.DependencyIs this ancestor satisfied? Note that this method must be safe to call on any thread.- Specified by:
satisfiedin interfaceNotificationQueue.Dependency- Parameters:
step- The step for which we are testing satisfaction- Returns:
- Whether the dependency is satisfied on
step(and will not fire subsequent notifications)
-
getUpdateGraph
- Specified by:
getUpdateGraphin interfaceNotificationQueue.Dependency- Returns:
- the update graph that this dependency is a part of
-
getInitialSize
public long getInitialSize() -
getExpectedSize
public long getExpectedSize()- Returns:
- the expected size of the table, or QueryConstants.NULL_LONG if the table is not known
-
isSimpleFilter
public boolean isSimpleFilter()- Specified by:
isSimpleFilterin interfaceWhereFilter- Returns:
- true if this is a filter that does not require any code execution, but rather is handled entirely within the database engine.
-
setRecomputeListener
Description copied from interface:WhereFilterSet theWhereFilter.RecomputeListenerthat should be notified if results based on this WhereFilter must be recomputed.- Specified by:
setRecomputeListenerin interfaceWhereFilter- Parameters:
listener- TheWhereFilter.RecomputeListenerto notify
-
copy
Description copied from interface:WhereFilterCreate a copy of this WhereFilter.- Specified by:
copyin interfaceWhereFilter- Returns:
- an independent copy of this WhereFilter.
-
isRefreshing
public boolean isRefreshing()Description copied from interface:WhereFilterIs this filter refreshing?- Specified by:
isRefreshingin interfaceWhereFilter- Returns:
- if this filter is refreshing
-
run
public void run() -
destroy
@OverridingMethodsMustInvokeSuper protected void destroy()Description copied from class:ReferenceCountedLivenessReferentAttempt to release (destructively when necessary) resources held by this object. This may render the object unusable for subsequent operations. Implementations should be sure to call super.destroy().This is intended to only ever be used as a side effect of decreasing the reference count to 0.
- Overrides:
destroyin classReferenceCountedLivenessReferent
-
permitParallelization
public boolean permitParallelization()Description copied from interface:WhereFilterReturns true if this filter permits parallelism.No serial filters permit parallelization. A filter may not permit parallelism if the internal implementation does not support multiple
WhereFilter.filter(RowSet, RowSet, Table, boolean)calls (e.g., some special filters that operate only on a rowset or have external state).ConditionFilters automatically determine whether they permit parallelization based on whether filters arestateless by default.- Specified by:
permitParallelizationin interfaceWhereFilter- Returns:
- if this filter can be applied in parallel
-