com.bigdata.relation.rule.eval
Class QueryTask
java.lang.Object
com.bigdata.service.FederationCallable<T>
com.bigdata.service.DataServiceCallable<RuleStats>
com.bigdata.relation.rule.eval.AbstractStepTask
com.bigdata.relation.rule.eval.QueryTask
- All Implemented Interfaces:
- IStepTask, IDataServiceCallable, IFederationCallable, Serializable, Cloneable, Callable<RuleStats>
public class QueryTask
- extends AbstractStepTask
A task that executes a query operation.
- Version:
- $Id: QueryTask.java 3041 2010-06-18 15:41:10Z thompsonbry $
- Author:
- Bryan Thompson
- See Also:
- Serialized Form
| Methods inherited from class com.bigdata.relation.rule.eval.AbstractStepTask |
clone, getIndexNames, getMutationBuffers, getReadRelations, getWriteRelationNames, getWriteRelations, runOne, runParallel, runSequential, submit, toString |
QueryTask
public QueryTask(IStep step,
IJoinNexusFactory joinNexusFactory,
IBlockingBuffer<ISolution[]> buffer,
IIndexManager indexManager,
DataService dataService)
- Parameters:
buffer - The IBlockingBuffer on which the ISolutions
will be written.
call
public RuleStats call()
throws Exception
- Run the task (invoked once we are in the target execution context).
- Throws:
Exception
runTasks
protected RuleStats runTasks(IJoinNexus joinNexus,
List<Callable<RuleStats>> tasks)
throws InterruptedException,
ExecutionException
- Run the task(s) and wait for them to complete.
- Returns:
- The
RuleStats
- Throws:
ExecutionException
InterruptedException
newQueryTasks
protected List<Callable<RuleStats>> newQueryTasks(IStep step,
IJoinNexus joinNexus,
IBlockingBuffer<ISolution[]> buffer)
- Builds a set of tasks for the program. Each task is assigned its own
UnsynchronizedArrayBuffer. Each task will flush that
UnsynchronizedArrayBuffer onto the given IBuffer when it
completes.
- Parameters:
step - The IStep.joinNexus - The IJoinNexus.buffer - The thread-safe buffer onto which the individual tasks emit
chunks.
- Returns:
- The list of tasks to run.
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.