Class ExecOpMultiRequest
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.NullaryExecutableOpBase
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.ExecOpMultiRequest
- All Implemented Interfaces:
StatsProvider,ExecutableOperator,NullaryExecutableOp
Issues the same request (same query pattern) at multiple federation members
and processes their respective responses, all in parallel. Every solution
mapping obtained via each such response is extended with a binding for the
given service variable and, then, passed on to the output. Specifically,
the service variable is assigned to the service URI of the corresponding
federation member.
In cases in which the query pattern of this request mentions the service variable, the implementation checks that the solution mappings obtained via a response bind this variable to the service URI of the federation member from which the response was received. As an additional optimization, to avoid even receiving the solution mappings that will be filtered out by this check, the implementation tries to add the following member-specific FILTER condition into the requests (which is possible only for federation members that support requests with FILTER conditions; e.g., SPARQL endpoints):
(! BOUND(?s)) || (?s = _uri_)
where ?s is the service variable and _uri_ is the service URI of the federation member.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThis response processor can be used for cases in which the service variable of this operator is not in the request of this operator and, thus, does not show up in the solution mappings obtained via this request.protected classThis response processor can be used for cases in which the service variable of this operator is also in the request of this operator, which means that the solution mappings obtained via this request may already have a binding for this variable and, thus, need to be checked for compatibility. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<FederationMember> protected intprotected final SPARQLRequestprotected final org.apache.jena.sparql.core.Varprotected org.apache.jena.sparql.expr.ExprVarprotected final booleanprotected org.apache.jena.sparql.expr.ExprFields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.NullaryExecutableOpBase
timeAtExecEnd, timeAtExecStartFields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions, mayReduce, qpInfo -
Constructor Summary
ConstructorsConstructorDescriptionExecOpMultiRequest(SPARQLRequest req, org.apache.jena.sparql.core.Var serviceVar, Set<FederationMember> fms, boolean collectExceptions, QueryPlanningInfo qpInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplementations of this function need to execute the algorithm of this operator and send the result elements (if any) to the given sink.protected ExecutableOperatorStatsImplprotected SPARQLRequestReturns a request with a graph pattern that is created by extending the graph pattern ofreqwith a FILTER of the form (!protected voidrecordException(String msg, Exception cause) voidMethods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.NullaryExecutableOpBase
execute, getStatsMethods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
getExceptionsCaughtDuringExecution, getQueryPlanningInfo, mayReduce, 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.ExecutableOperator
getExceptionsCaughtDuringExecution, getQueryPlanningInfo, mayReduce
-
Field Details
-
req
-
serviceVar
protected final org.apache.jena.sparql.core.Var serviceVar -
fms
-
serviceVarIsInPattern
protected final boolean serviceVarIsInPattern -
serviceVarForExpressions
protected org.apache.jena.sparql.expr.ExprVar serviceVarForExpressions -
subExpr1
protected org.apache.jena.sparql.expr.Expr subExpr1 -
numberOfRequestsIssued
protected int numberOfRequestsIssued
-
-
Constructor Details
-
ExecOpMultiRequest
public ExecOpMultiRequest(SPARQLRequest req, org.apache.jena.sparql.core.Var serviceVar, Set<FederationMember> fms, boolean collectExceptions, QueryPlanningInfo qpInfo)
-
-
Method Details
-
_execute
protected void _execute(IntermediateResultElementSink sink, QueryProcContextExt ctx) throws ExecOpExecutionException Description copied from class:NullaryExecutableOpBaseImplementations of this function need to execute the algorithm of this operator and send the 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.- Specified by:
_executein classNullaryExecutableOpBase- Throws:
ExecOpExecutionException
-
makeRequestMemberSpecific
Returns a request with a graph pattern that is created by extending the graph pattern ofreqwith a FILTER of the form (! BOUND(?s)) || (?s = _uri_) where ?s is the service variable (seeserviceVar) and _uri_ is the service URI of the given federation member. If the given federation member does not support the extended graph pattern,nullis returned. -
resetStats
public void resetStats()- Specified by:
resetStatsin interfaceStatsProvider- Overrides:
resetStatsin classNullaryExecutableOpBase
-
createStats
- Overrides:
createStatsin classNullaryExecutableOpBase
-
recordException
-