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 IAggregates 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, getGroupByStateassertAtOnceJavaHeapOp, 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, toArrayannotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString, toString, toStringpublic 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 IAggregates; and (b) IAggregates are not
nested within other IAggregates. 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 IAggregates in other IAggregates.
isPipelinedAggregationOp in class GroupByOppublic int getInitialCapacity()
HashMapAnnotations.INITIAL_CAPACITYpublic float getLoadFactor()
HashMapAnnotations.LOAD_FACTORpublic BOpStats newStats()
PipelineOpnewStats in class PipelineOppublic FutureTask<Void> eval(BOpContext<IBindingSet> context)
PipelineOpFutureTask 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 PipelineOpcontext - The evaluation context.FutureTask which will compute the operator's
evaluation.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.