|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.bop.CoreBaseBOp
com.bigdata.bop.BOpBase
com.bigdata.bop.PipelineOp
public abstract class PipelineOp
Abstract base class for pipeline operators where the data moving along the
pipeline is chunks of IBindingSets.
| Nested Class Summary | |
|---|---|
static interface |
PipelineOp.Annotations
|
| Field Summary |
|---|
| Fields inherited from class com.bigdata.bop.CoreBaseBOp |
|---|
DEFAULT_INITIAL_CAPACITY |
| Fields inherited from interface com.bigdata.bop.BOp |
|---|
NOANNS, NOARGS |
| Constructor Summary | |
|---|---|
protected |
PipelineOp(BOp[] args,
Map<String,Object> annotations)
Shallow copy constructor. |
protected |
PipelineOp(PipelineOp op)
Required deep copy constructor. |
| Method Summary | |
|---|---|
protected void |
assertAtOnceJavaHeapOp()
Assert that this operator is annotated as an "at-once" operator which buffers its data on the java heap. |
abstract FutureTask<Void> |
eval(BOpContext<IBindingSet> context)
Return a FutureTask which computes the operator against the
evaluation context. |
int |
getChunkCapacity()
|
int |
getChunkOfChunksCapacity()
|
long |
getChunkTimeout()
|
long |
getMaxMemory()
The maximum amount of memory which may be used to buffered inputs for this operator on the native heap. |
int |
getMaxParallel()
The maximum parallelism with which tasks may be evaluated for this operator (this is a per-shard limit in scale-out). |
boolean |
isAtOnceEvaluation()
true iff the operator will use at-once evaluation (all
inputs for the operator will be buffered and the operator will run
exactly once to consume those inputs). |
boolean |
isBlockedEvaluation()
true iff the operator uses blocked evaluation (it buffers
data on the native heap up to a threshold and then evaluate that block of
data). |
boolean |
isLastPassRequested()
Return true iff a final evaluation pass is requested by the
operator. |
boolean |
isPipelinedEvaluation()
Return true iff the operator uses pipelined evaluation
(versus "at-once" or "blocked" evaluation as discussed below). |
boolean |
isSharedState()
Return true iff #newStats(IQueryContext) must be
shared across all invocations of eval(BOpContext) for this
operator for a given query. |
BOpStats |
newStats()
Return a new object which can be used to collect statistics on the operator evaluation. |
| Methods inherited from class com.bigdata.bop.BOpBase |
|---|
_clearProperty, _set, _setProperty, annotations, annotationsCopy, annotationsEqual, annotationsRef, argIterator, args, argsCopy, arity, clearAnnotations, clearProperty, deepCopy, deepCopy, get, getProperty, setArg, setProperty, setUnboundProperty, toArray, toArray |
| Methods inherited from class com.bigdata.bop.CoreBaseBOp |
|---|
annotationsEqual, annotationsToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, toShortString, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected PipelineOp(PipelineOp op)
op -
protected PipelineOp(BOp[] args,
Map<String,Object> annotations)
args - annotations - | Method Detail |
|---|
public final int getChunkCapacity()
BufferAnnotations.CHUNK_CAPACITYpublic final int getChunkOfChunksCapacity()
BufferAnnotations.CHUNK_OF_CHUNKS_CAPACITYpublic final long getChunkTimeout()
BufferAnnotations.CHUNK_TIMEOUTpublic final long getMaxMemory()
Long.MAX_VALUE, an essentially
unbounded amount of data may be buffered on the native heap. Together
with PipelineOp.Annotations.PIPELINED, PipelineOp.Annotations.MAX_MEMORY is
used to determine whether an operator uses pipelined,
at-once, or blocked evaluation.
PipelineOp.Annotations.MAX_MEMORYpublic final boolean isPipelinedEvaluation()
true iff the operator uses pipelined evaluation
(versus "at-once" or "blocked" evaluation as discussed below).
PipelineOp.Annotations.PIPELINED,
PipelineOp.Annotations.MAX_MEMORYpublic final boolean isAtOnceEvaluation()
true iff the operator will use at-once evaluation (all
inputs for the operator will be buffered and the operator will run
exactly once to consume those inputs).
PipelineOp.Annotations.PIPELINED,
PipelineOp.Annotations.MAX_MEMORYpublic final boolean isBlockedEvaluation()
true iff the operator uses blocked evaluation (it buffers
data on the native heap up to a threshold and then evaluate that block of
data).
PipelineOp.Annotations.PIPELINED,
PipelineOp.Annotations.MAX_MEMORYprotected void assertAtOnceJavaHeapOp()
PIPELINED := false MAX_MEMORY := 0When the operator is not pipelined then it is either "blocked" or "at-once". When MAX_MEMORY is ZERO, the operator will buffer its data on the Java heap. All operators which buffer data on the java heap will buffer an unbounded amount of data and are therefore "at-once" rather than "blocked". Operators which buffer their data on the native heap may support either "blocked" and/or "at-once" evaluation, depending on the operators. E.g., a hash join can be either "blocked" or "at-once" while an ORDER-BY is always "at-once".
public final int getMaxParallel()
PipelineOp.Annotations.MAX_PARALLELpublic final boolean isLastPassRequested()
true iff a final evaluation pass is requested by the
operator. The final evaluation pass will be invoked once for each node or
shard on which the operator was evaluated once it has consumed all inputs
from upstream operators.
PipelineOp.Annotations.LAST_PASSpublic final boolean isSharedState()
true iff #newStats(IQueryContext) must be
shared across all invocations of eval(BOpContext) for this
operator for a given query.
PipelineOp.Annotations.SHARED_STATEpublic BOpStats newStats()
public abstract FutureTask<Void> eval(BOpContext<IBindingSet> context)
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).
context - The evaluation context.
FutureTask which will compute the operator's
evaluation.Callables for now since we must run each
task in its own thread until Java7 gives us fork/join pools and
asynchronous file I/O. For the fork/join model we will probably
return the ForkJoinTask.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||