public class DistributedJoinMasterTask extends JoinMasterTask implements Serializable
Note: For query, this object MUST be executed locally on the client. This
ensures that all data flows back to the client directly. For mutation, it
is possible to submit this object to any service in the federation and
DistributedJoinTask will write directly on the scale-out
view of the target
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the buffer specified to the ctor (overridden for distributed joins).
Create and run the
awaitAll, call, combineJoinStats, getUUID, newBindingSetIterator, report
public DistributedJoinMasterTask(IRule rule, IJoinNexus joinNexus, IBuffer<ISolution> buffer)
buffer- The buffer on which the last
DistributedJoinTaskwill write query
ISolutions. However, it is ignored for mutation operations as each
DistributedJoinTaskfor the last join dimension (there can be more than one if the index partition has more than one partition) will obtain and write on its own solution buffer in order to avoid moving all data through the master.
public IBuffer<ISolution> getSolutionBuffer() throws IOException
JoinTask(s) that will evaluate the first join dimension.
JoinTask is created on the
DataService for each
index partition that is spanned by the
IAccessPath for the
IPredicate in the evaluation order. Those
JoinTask are run in parallel, so the actual parallelism for
IPredicate is the #of index partitions spanned by
protected List<Future> mapBindingSet(IBindingSet bindingSet) throws Exception
JoinTask(s) for the index partition(s) the span the
bindingSet- The binding set.
Futures for the
JoinTaskFactoryTaskthat will create the
DistributedJoinTasks for the first join dimension.
Exception- FIXME If a predicate defines an
IAccessPathExpanderthen we DO NOT map the predicate. Instead, we use
IJoinNexus#getTailAccessPath(IPredicate)and evaluate the
IAccessPathwith the layered
IAccessPathExpanderin process. If the
IAccessPathExpandertouches the index, it will be using an
IClientIndex. While the
IClientIndexis not nearly as efficient as using a local index partition, it will provide a view of the total key-range partitioned index.
do this for each join dimension for which an
IAccessPathExpander is defined, including not only the first N
join dimensions (handles free text search) but also an intermediate
join dimension (requires that all source join tasks target a join
task having a view of the scale-out index rather than mapping the
task across the index partitions).
FIXME The initial binding set should not be mapped across the index
partitions for the first join dimension if
true (any parallel evaluation violates the stable
protected List<Future<Void>> awaitFactoryFutures(List<Future> factoryTaskFutures) throws InterruptedException, ExecutionExceptions
factoryTaskFutures- A list of
Futures, with one
Futurefor each index partition that is spanned by the
IAccessPathfor the first
IPredicatein the evaluation order.
Futures. There will be one element in the list for each
Futurein the caller's list. The elements will be in the same order.
InterruptedException- if the master itself was interrupted.
ExecutionExceptions- if any of the factory tasks fail.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.