Class SailFederationEvalStrategy
java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.impl.DefaultEvaluationStrategy
org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy
org.eclipse.rdf4j.federated.evaluation.FederationEvalStrategy
org.eclipse.rdf4j.federated.evaluation.SailFederationEvalStrategy
- All Implemented Interfaces:
EvaluationStrategy,FederatedServiceResolver,FederatedServiceResolverClient,UUIDable
Implementation of a federation evaluation strategy which provides some special optimizations for Native (local) RDF4J
repositories. The most important optimization is to use prepared Queries that are already created in the internal
representation used by RDF4J. This is necessary to avoid String parsing overhead.
Joins are executed using
ControlledWorkerJoin- Author:
- Andreas Schwarte
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.federated.evaluation.FederationEvalStrategy
cache, executor, federationContextFields inherited from class org.eclipse.rdf4j.query.algebra.evaluation.impl.DefaultEvaluationStrategy
dataset, serviceResolver, tripleSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluateBoundJoinStatementPattern(StatementTupleExpr stmt, List<BindingSet> bindings) Evaluate a bound join at the relevant endpoint, i.e.evaluateExclusiveGroup(ExclusiveGroup group, BindingSet bindings) evaluateGroupedCheck(CheckStatementPattern stmt, List<BindingSet> bindings) Perform a grouped check at the relevant endpoints, i.e.executeJoin(ControlledWorkerScheduler<BindingSet> joinScheduler, CloseableIteration<BindingSet, QueryEvaluationException> leftIter, TupleExpr rightArg, Set<String> joinVars, BindingSet bindings, QueryInfo queryInfo) Execute the join in a separate thread using some join executor.Methods inherited from class org.eclipse.rdf4j.federated.evaluation.FederationEvalStrategy
evaluate, evaluate, evaluate, evaluate, evaluate, evaluateArbitrayLengthPath, evaluateAtStatementSources, evaluateAtStatementSources, evaluateAtStatementSources, evaluateExclusiveTupleExpr, evaluateLeftJoin, evaluateNaryUnion, evaluateNJoin, evaluateService, evaluateService, evaluateSingleSourceQuery, evaluateZeroLengthPath, getStatements, optimize, optimizeExclusiveExpressions, optimizeJoinOrder, performSourceSelection, performSourceSelection, precompile, precompile, prepare, prepare, prepare, prepare, prepareExclusiveTupleExpr, prepareLeftJoin, prepareNaryUnion, prepareNJoin, propagateServicesMethods inherited from class org.eclipse.rdf4j.query.algebra.evaluation.impl.DefaultEvaluationStrategy
evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, getCollectionFactory, getFederatedServiceResolver, getLimit, getQueryEvaluationMode, getService, getUUID, getVarValue, isReducedOrDistinct, isTrue, isTrue, precompile, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, prepare, setCollectionFactory, setFederatedServiceResolver, setOptimizerPipeline, setQueryEvaluationMode, setTrackResultSize, setTrackTime, supplyBinaryValueEvaluation, supplyUnaryValueEvaluationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.query.algebra.evaluation.EvaluationStrategy
isTrackResultSize, makeQueue, makeSet
-
Constructor Details
-
SailFederationEvalStrategy
-
-
Method Details
-
evaluateBoundJoinStatementPattern
public CloseableIteration<BindingSet,QueryEvaluationException> evaluateBoundJoinStatementPattern(StatementTupleExpr stmt, List<BindingSet> bindings) throws QueryEvaluationException Description copied from class:FederationEvalStrategyEvaluate a bound join at the relevant endpoint, i.e. i.e. for a group of bindings retrieve results for the bound statement from the relevant endpoints- Specified by:
evaluateBoundJoinStatementPatternin classFederationEvalStrategy- Returns:
- the result iteration
- Throws:
QueryEvaluationException
-
evaluateGroupedCheck
public CloseableIteration<BindingSet,QueryEvaluationException> evaluateGroupedCheck(CheckStatementPattern stmt, List<BindingSet> bindings) throws QueryEvaluationException Description copied from class:FederationEvalStrategyPerform a grouped check at the relevant endpoints, i.e. for a group of bindings keep only those for which at least one endpoint provides a result to the bound statement.- Specified by:
evaluateGroupedCheckin classFederationEvalStrategy- Returns:
- the result iteration
- Throws:
QueryEvaluationException
-
executeJoin
public CloseableIteration<BindingSet,QueryEvaluationException> executeJoin(ControlledWorkerScheduler<BindingSet> joinScheduler, CloseableIteration<BindingSet, QueryEvaluationException> leftIter, TupleExpr rightArg, Set<String> joinVars, BindingSet bindings, QueryInfo queryInfo) throws QueryEvaluationExceptionDescription copied from class:FederationEvalStrategyExecute the join in a separate thread using some join executor. Join executors are for instance: -SynchronousJoin-SynchronousBoundJoin-ControlledWorkerJoin-ControlledWorkerBoundJoinFor endpoint federation use controlled worker bound join, for local federation use controlled worker join. The other operators are there for completeness. UseFederationEvalStrategy.executorto execute the join (it is a runnable).- Specified by:
executeJoinin classFederationEvalStrategy- Returns:
- the result
- Throws:
QueryEvaluationException
-
evaluateExclusiveGroup
public CloseableIteration<BindingSet,QueryEvaluationException> evaluateExclusiveGroup(ExclusiveGroup group, BindingSet bindings) throws RepositoryException, MalformedQueryException, QueryEvaluationException - Specified by:
evaluateExclusiveGroupin classFederationEvalStrategy- Throws:
RepositoryExceptionMalformedQueryExceptionQueryEvaluationException
-