Class BinaryExecutableOpBase
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BinaryExecutableOpBase
- All Implemented Interfaces:
StatsProvider,BinaryExecutableOp,ExecutableOperator
- Direct Known Subclasses:
ExecOpBinaryUnion,ExecOpHashJoin,ExecOpNaiveNestedLoopsJoin,ExecOpSymmetricHashJoin
Top-level base class for all implementations of
BinaryExecutableOp.
This base class handles the collection of statistics about both the two
inputs and the processing times per input block from the two inputs. To
this end, it implements the major methods of the BinaryExecutableOp
interface, where the actual functionality to be implemented for these methods
needs to be provided by implementing four abstract functions in each sub-class
of this base class. These four functions are:
_processBlockFromChild1(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext),_processBlockFromChild2(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext),_wrapUpForChild1(IntermediateResultElementSink, ExecutionContext), and_wrapUpForChild2(IntermediateResultElementSink, ExecutionContext).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected longFields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void_processBlockFromChild1(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given input block coming from the first operand and send the produced result elements (if any) to the given sink.protected abstract void_processBlockFromChild2(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given input block coming from the second operand and send the produced result elements (if any) to the given sink.protected abstract void_wrapUpForChild1(IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to finish up any processing related to the input coming from the first operand and send the remaining result elements (if any) to the given sink.protected abstract void_wrapUpForChild2(IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to finish up any processing related to the input coming from the second operand and send the remaining result elements (if any) to the given sink.protected ExecutableOperatorStatsImplfinal ExecutableOperatorStatsgetStats()final voidprocessBlockFromChild1(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given input coming from the first operand and sends the produced result elements (if any) to the given sink.final voidprocessBlockFromChild2(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given input coming from the second operand and sends the produced result elements (if any) to the given sink.voidfinal voidwrapUpForChild1(IntermediateResultElementSink sink, ExecutionContext execCxt) Finishes up any processing related to the input coming from the first operand and sends the remaining result elements (if any) to the given sink.final voidwrapUpForChild2(IntermediateResultElementSink sink, ExecutionContext execCxt) Finishes up any processing related to the input coming from the second operand and sends the remaining result elements (if any) to the given sink.Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
getExceptionsCaughtDuringExecution, recordExceptionCaughtDuringExecutionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.BinaryExecutableOp
preferredInputBlockSizeFromChild1, preferredInputBlockSizeFromChild2, requiresCompleteChild1InputFirstMethods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.ExecutableOperator
getExceptionsCaughtDuringExecution
-
Field Details
-
timeAtCurrentLeftProcStart
protected long timeAtCurrentLeftProcStart -
timeAtCurrentRightProcStart
protected long timeAtCurrentRightProcStart
-
-
Constructor Details
-
BinaryExecutableOpBase
public BinaryExecutableOpBase(boolean collectExceptions)
-
-
Method Details
-
processBlockFromChild1
public final void processBlockFromChild1(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:BinaryExecutableOpProcesses the given input coming from the first operand and sends the produced result elements (if any) to the given sink.- Specified by:
processBlockFromChild1in interfaceBinaryExecutableOp- Throws:
ExecOpExecutionException
-
wrapUpForChild1
public final void wrapUpForChild1(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:BinaryExecutableOpFinishes up any processing related to the input coming from the first operand and sends the remaining result elements (if any) to the given sink. This method will be called only once, after the sub-plan that produces the input coming from the first operand has finished producing its result.- Specified by:
wrapUpForChild1in interfaceBinaryExecutableOp- Throws:
ExecOpExecutionException
-
processBlockFromChild2
public final void processBlockFromChild2(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:BinaryExecutableOpProcesses the given input coming from the second operand and sends the produced result elements (if any) to the given sink. May throwIllegalStateExceptionfor operators for whichBinaryExecutableOp.requiresCompleteChild1InputFirst()returns true andBinaryExecutableOp.wrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has not been called yet.- Specified by:
processBlockFromChild2in interfaceBinaryExecutableOp- Throws:
ExecOpExecutionException
-
wrapUpForChild2
public final void wrapUpForChild2(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:BinaryExecutableOpFinishes up any processing related to the input coming from the second operand and sends the remaining result elements (if any) to the given sink. This method will be called only once, after the sub-plan that produces the input coming from the second operand has finished producing its result. May throwIllegalStateExceptionfor operators for whichBinaryExecutableOp.requiresCompleteChild1InputFirst()returns true andBinaryExecutableOp.wrapUpForChild1(IntermediateResultElementSink, ExecutionContext)has not been called yet.- Specified by:
wrapUpForChild2in interfaceBinaryExecutableOp- Throws:
ExecOpExecutionException
-
_processBlockFromChild1
protected abstract void _processBlockFromChild1(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given input block coming from the first operand and send the produced result elements (if any) to the given sink. If an exception occurs while processing the input block, this exception needs to either be collected or be thrown, depending on whetherBaseForExecOps.collectExceptionsis set totrue.- Throws:
ExecOpExecutionException
-
_wrapUpForChild1
protected abstract void _wrapUpForChild1(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to finish up any processing related to the input coming from the first operand and send the remaining result elements (if any) to the given sink. If an exception occurs during this process, then this exception needs to either be collected or be thrown, depending on whetherBaseForExecOps.collectExceptionsis set totrue.- Throws:
ExecOpExecutionException
-
_processBlockFromChild2
protected abstract void _processBlockFromChild2(IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given input block coming from the second operand and send the produced result elements (if any) to the given sink. If an exception occurs while processing the input block, this exception needs to either be collected or be thrown, depending on whetherBaseForExecOps.collectExceptionsis set totrue.- Throws:
ExecOpExecutionException
-
_wrapUpForChild2
protected abstract void _wrapUpForChild2(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to finish up any processing related to the input coming from the second operand and send the remaining result elements (if any) to the given sink. If an exception occurs during this process, then this exception needs to either be collected or be thrown, depending on whetherBaseForExecOps.collectExceptionsis set totrue.- Throws:
ExecOpExecutionException
-
resetStats
public void resetStats()- Specified by:
resetStatsin interfaceStatsProvider
-
getStats
- Specified by:
getStatsin interfaceExecutableOperator- Specified by:
getStatsin interfaceStatsProvider
-
createStats
-