Class NaryExecutableOpBase
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.NaryExecutableOpBase
- All Implemented Interfaces:
StatsProvider
,ExecutableOperator
,NaryExecutableOp
- Direct Known Subclasses:
ExecOpMultiwayUnion
Top-level base class for all implementations of
NaryExecutableOp
.
This base class handles the collection of statistics about each of the
inputs and about the processing times per input block from each of the
inputs. To this end, this base class implements the major methods of the
NaryExecutableOp
interface, where the actual functionality to be
implemented for these methods needs to be provided by implementing two
abstract functions in each sub-class of this base class.
These two functions are:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
protected long[]
Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_processInputFromXthChild
(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the input solution mappings of the given list by calling_processInputFromXthChild(int, SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for each of them.protected abstract void
_processInputFromXthChild
(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given solution mapping as input coming from the x-th operand and send the produced result elements (if any) to the given sink.protected abstract void
_wrapUpForXthChild
(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to finish up any processing related to the input coming from the x-th operand and send the remaining result elements (if any) to the given sink.protected ExecutableOperatorStatsImpl
final ExecutableOperatorStats
getStats()
final void
processInputFromXthChild
(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the solution mappings oft he given list as input coming from the x-th operand and sends the produced result elements (if any) to the given sink.final void
processInputFromXthChild
(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given solution mapping as input coming from the x-th operand and sends the produced result elements (if any) to the given sink.void
final void
wrapUpForXthChild
(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) Finishes up any processing related to the input coming from the x-th 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, recordExceptionCaughtDuringExecution
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.ExecutableOperator
getExceptionsCaughtDuringExecution
-
Field Details
-
numberOfChildren
protected final int numberOfChildren -
timeAtCurrentProcStartXthInput
protected long[] timeAtCurrentProcStartXthInput
-
-
Constructor Details
-
NaryExecutableOpBase
public NaryExecutableOpBase(int numberOfChildren, boolean collectExceptions)
-
-
Method Details
-
processInputFromXthChild
public final void processInputFromXthChild(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOp
Processes the given solution mapping as input coming from the x-th operand and sends the produced result elements (if any) to the given sink.- Specified by:
processInputFromXthChild
in interfaceNaryExecutableOp
- Throws:
ExecOpExecutionException
-
processInputFromXthChild
public final void processInputFromXthChild(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOp
Processes the solution mappings oft he given list as input coming from the x-th operand and sends the produced result elements (if any) to the given sink. The default implementation of this method simply callsNaryExecutableOp.processInputFromXthChild(int, SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for every solution mapping of the given list Subclasses may override this behavior to send a greater number of output solution mappings to the given sink at a time (which is useful to reduce the communication between threads in the push-based execution model).- Specified by:
processInputFromXthChild
in interfaceNaryExecutableOp
- Throws:
ExecOpExecutionException
-
wrapUpForXthChild
public final void wrapUpForXthChild(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOp
Finishes up any processing related to the input coming from the x-th operand and sends the remaining result elements (if any) to the given sink. This method will be called once for each of the operands, after the sub-plan that produces the input coming from the operand has finished producing its result.- Specified by:
wrapUpForXthChild
in interfaceNaryExecutableOp
- Throws:
ExecOpExecutionException
-
resetStats
public void resetStats()- Specified by:
resetStats
in interfaceStatsProvider
-
_processInputFromXthChild
protected abstract void _processInputFromXthChild(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given solution mapping as input coming from the x-th operand and send the produced result elements (if any) to the given sink. If an exception occurs while processing the solution mapping, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
_processInputFromXthChild
protected void _processInputFromXthChild(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the input solution mappings of the given list by calling_processInputFromXthChild(int, SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for each of them. Subclasses may override this behavior to send a greater number of output solution mappings to the given sink at a time (which is useful to reduce the communication between threads in the push-based execution model). If an exception occurs within the overriding implementation, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
_wrapUpForXthChild
protected abstract void _wrapUpForXthChild(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to finish up any processing related to the input coming from the x-th operand and send the remaining result elements (if any) to the given sink. If an exception occurs while processing the solution mapping, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
getStats
- Specified by:
getStats
in interfaceExecutableOperator
- Specified by:
getStats
in interfaceStatsProvider
-
createStats
-