Package nz.org.riskscape.engine.task
Class PageSplitterTask
java.lang.Object
nz.org.riskscape.engine.task.WorkerTask
nz.org.riskscape.engine.task.PageSplitterTask
- All Implemented Interfaces:
AutoCloseable
Takes a page of tuples as input and writes smaller pages as output. This allows us to parallelize very expensive operations (like the join-loop) across multiple Worker threads. This is useful when the operation involves only a small number of tuples, i.e. if the tuples all fit in one page, then only a single Worker will get lumped with doing all the expensive work.
-
Field Summary
Fields inherited from class nz.org.riskscape.engine.task.WorkerTask
id, in, out, pageReader, pageWriter, processingResult, runtime, runtimeAverage, spec
-
Constructor Summary
-
Method Summary
Methods inherited from class nz.org.riskscape.engine.task.WorkerTask
close, consumeProcessingResult, getContext, getFirstStep, getFirstStepRealizedResult, getLastStep, getName, getPageReader, getPageWriter, getSpec, getSpecNameBrief, hasInputPage, hasOutputPage, hasPageInProgress, isComplete, isCreated, isInputReady, isOutputReady, isReadyToRun, isStarted, markComplete, markStarted, runPublic, taskComplete, toString
-
Constructor Details
-
PageSplitterTask
-
-
Method Details
-
run
Description copied from class:WorkerTask
Processes the work that the task has to do. The task doesn't necessarily run to completion in one go - it's likely that the task will run out of input or output first, so it'll need to keep coming back and chipping away at the work.
- Specified by:
run
in classWorkerTask
-
producesResult
public boolean producesResult()- Specified by:
producesResult
in classWorkerTask
-