public class PipelinedAggregationOp extends GroupByOp implements ISingleThreadedOp
Note: This implementation is a pipelined operator which inspects each chunk
of solutions as they arrive. The state is shared across invocations of the
operator for each source chunk. The operator waits until the last chunk has
been consumed before writing the output solutions. In order to observe the
lastInvocation signal, the operator MUST be single threaded (
PipelineOp.Annotations#MAX_PARALLEL
:=1) and running on the query
controller.
Note: Since this operator evaluates IAggregate
s incrementally (one
input solution at a time), it relies on IAggregate
's contract for
"sticky" errors. See IAggregate.get(IBindingSet)
and
IAggregate.done()
.
Note: This this operator will be invoked multiple times, and potentially on
multiple nodes in a cluster, it is critical that the anonymous variables
assigned by the GroupByRewriter
are stable across all invocations on
any node of the cluster (this caution also applies for a single node where
the operator can still be invoked multiple times).
Modifier and Type | Class and Description |
---|---|
static interface |
PipelinedAggregationOp.Annotations |
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
PipelinedAggregationOp(BOp[] args,
Map<String,Object> annotations)
Required shallow copy constructor.
|
PipelinedAggregationOp(PipelinedAggregationOp op)
Constructor required for
com.bigdata.bop.BOpUtility#deepCopy(FilterNode) . |
Modifier and Type | Method and Description |
---|---|
FutureTask<Void> |
eval(BOpContext<IBindingSet> context)
Return a
FutureTask which computes the operator against the
evaluation context. |
int |
getInitialCapacity() |
float |
getLoadFactor() |
boolean |
isPipelinedAggregationOp()
Return
true iff this operator supports pipelined aggregation |
BOpStats |
newStats()
Return a new object which can be used to collect statistics on the
operator evaluation.
|
getGroupByRewrite, getGroupByState
assertAtOnceJavaHeapOp, assertMaxParallelOne, getChunkCapacity, getChunkOfChunksCapacity, getChunkTimeout, getMaxMemory, getMaxParallel, isAtOnceEvaluation, isBlockedEvaluation, isLastPassRequested, isPipelinedEvaluation, isReorderSolutions, isSharedState
__replaceArg, _clearProperty, _set, _setProperty, annotations, annotationsCopy, annotationsEqual, annotationsRef, argIterator, args, argsCopy, arity, clearAnnotations, clearProperty, deepCopy, deepCopy, get, getProperty, setArg, setProperty, setUnboundProperty, toArray, toArray
annotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString, toString, toString
public PipelinedAggregationOp(PipelinedAggregationOp op)
com.bigdata.bop.BOpUtility#deepCopy(FilterNode)
.public boolean isPipelinedAggregationOp()
true
iff this operator supports pipelined aggregation
Note: Pipelined aggregation is only possible when (a) DISTINCT is not
used in the IAggregate
s; and (b) IAggregate
s are not
nested within other IAggregate
s. An implementation which returns
true
for this method MUST NOT be used for aggregation
operations which would violate either of these constraints.
Returns true
. This is a pipelined aggregation operator and
MAY NOT be used to evaluate aggregation requests which use DISTINCT or
which nest IAggregate
s in other IAggregate
s.
isPipelinedAggregationOp
in class GroupByOp
public int getInitialCapacity()
HashMapAnnotations.INITIAL_CAPACITY
public float getLoadFactor()
HashMapAnnotations.LOAD_FACTOR
public BOpStats newStats()
PipelineOp
newStats
in class PipelineOp
public FutureTask<Void> eval(BOpContext<IBindingSet> context)
PipelineOp
FutureTask
which computes the operator against the
evaluation context. The caller is responsible for executing the
FutureTask
(this gives them the ability to hook the completion of
the computation).eval
in class PipelineOp
context
- The evaluation context.FutureTask
which will compute the operator's
evaluation.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.