Class BaseForExecOpIndexNestedLoopsJoinWithRequestOps<QueryType extends Query,MemberType extends FederationMember>
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBase
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBaseWithBatching
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOpIndexNestedLoopsJoinWithRequestOps<QueryType,MemberType>
- All Implemented Interfaces:
StatsProvider
,ExecutableOperator
,UnaryExecutableOp
- Direct Known Subclasses:
BaseForExecOpIndexNestedLoopsJoinWithTPFRequests
public abstract class BaseForExecOpIndexNestedLoopsJoinWithRequestOps<QueryType extends Query,MemberType extends FederationMember>
extends UnaryExecutableOpBaseWithBatching
Abstract base class to implement index nested loops joins by using request
operators. The possibility to rely on a request operator is particularly
useful in cases in which this operator implements paging, because the
alternative would be the need to re-implement paging again in the nested
loops join algorithm of potential subclasses of this base class.
For an abstract base class that issues requests directly (instead of using
request operators), use
BaseForExecOpIndexNestedLoopsJoinWithRequests
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
protected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected final MemberType
protected long
protected int
protected final QueryType
protected ExecutableOperatorStats
protected final boolean
Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBaseWithBatching
batchSize, collectedInputSolMaps
Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseForExecOpIndexNestedLoopsJoinWithRequestOps
(QueryType query, MemberType fm, boolean useOuterJoinSemantics, boolean collectExceptions) protected
BaseForExecOpIndexNestedLoopsJoinWithRequestOps
(QueryType query, MemberType fm, boolean useOuterJoinSemantics, int batchSize, boolean collectExceptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_concludeExecution
(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given batch of solution mappings as last input, conclude the execution of this operator, and send the remaining result elements (if any) to the given sink.protected void
_processBatch
(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given batch of solution mappings as input and send the produced result elements (if any) to the given sink.protected abstract NullaryExecutableOp
protected Runnable
createProcessor
(NullaryExecutableOp reqOp, SolutionMapping smFromInput, IntermediateResultElementSink outputSink, ExecutionContext execCxt) protected ExecutableOperatorStatsImpl
protected CompletableFuture<?>[]
initiateProcessing
(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) protected CompletableFuture
<?> initiateProcessing
(SolutionMapping sm, IntermediateResultElementSink sink, ExecutionContext execCxt) void
Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBaseWithBatching
_concludeExecution, _process
Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBase
_process, concludeExecution, getStats, process, process
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
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
query
-
fm
-
useOuterJoinSemantics
protected final boolean useOuterJoinSemantics -
numberOfOutputMappingsProduced
protected long numberOfOutputMappingsProduced -
numberOfRequestOpsUsed
protected int numberOfRequestOpsUsed -
statsOfLastReqOp
-
-
Constructor Details
-
BaseForExecOpIndexNestedLoopsJoinWithRequestOps
protected BaseForExecOpIndexNestedLoopsJoinWithRequestOps(QueryType query, MemberType fm, boolean useOuterJoinSemantics, int batchSize, boolean collectExceptions) -
BaseForExecOpIndexNestedLoopsJoinWithRequestOps
protected BaseForExecOpIndexNestedLoopsJoinWithRequestOps(QueryType query, MemberType fm, boolean useOuterJoinSemantics, boolean collectExceptions)
-
-
Method Details
-
_processBatch
protected void _processBatch(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from class:UnaryExecutableOpBaseWithBatching
Implementations of this function need to process the given batch of solution mappings as input and send the produced result elements (if any) to the given sink. If an exception occurs while processing the batch, then this exception needs to be thrown.- Specified by:
_processBatch
in classUnaryExecutableOpBaseWithBatching
- Throws:
ExecOpExecutionException
-
initiateProcessing
protected CompletableFuture<?>[] initiateProcessing(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) -
initiateProcessing
protected CompletableFuture<?> initiateProcessing(SolutionMapping sm, IntermediateResultElementSink sink, ExecutionContext execCxt) throws VariableByBlankNodeSubstitutionException -
createExecutableRequestOperator
protected abstract NullaryExecutableOp createExecutableRequestOperator(SolutionMapping sm) throws VariableByBlankNodeSubstitutionException -
createProcessor
protected Runnable createProcessor(NullaryExecutableOp reqOp, SolutionMapping smFromInput, IntermediateResultElementSink outputSink, ExecutionContext execCxt) -
_concludeExecution
protected void _concludeExecution(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from class:UnaryExecutableOpBaseWithBatching
Implementations of this function need to process the given batch of solution mappings as last input, conclude the execution of this operator, and send the remaining result elements (if any) to the given sink. Notice that the given batch of solution mappings may be empty! If an exception occurs during this process, then this exception needs to be thrown.- Specified by:
_concludeExecution
in classUnaryExecutableOpBaseWithBatching
- Throws:
ExecOpExecutionException
-
resetStats
public void resetStats()- Specified by:
resetStats
in interfaceStatsProvider
- Overrides:
resetStats
in classUnaryExecutableOpBaseWithBatching
-
createStats
- Overrides:
createStats
in classUnaryExecutableOpBaseWithBatching
-