public abstract class AbstractIterativePactTask<S extends Function,OT> extends RegularPactTask<S,OT> implements Terminable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isSolutionSetUpdate |
protected boolean |
isWorksetIteration |
protected boolean |
isWorksetUpdate |
protected LongSumAggregator |
worksetAggregator |
protected BlockingBackChannel |
worksetBackChannel |
broadcastInputIterators, broadcastInputReaders, broadcastInputSerializers, chainedTasks, config, driver, eventualOutputs, inputComparators, inputIterators, inputReaders, inputs, inputSerializers, iterativeBroadcastInputs, iterativeInputs, localStrategies, LOG, output, resettableInputs, running, runtimeUdfContext, stub, tempBarriers, userCodeClassLoader| Constructor and Description |
|---|
AbstractIterativePactTask() |
| Modifier and Type | Method and Description |
|---|---|
String |
brokerKey() |
void |
cancel()
This method is called when a task is canceled either as a result of a user abort or an execution failure.
|
protected void |
closeLocalStrategiesAndCaches() |
RuntimeUDFContext |
createRuntimeContext(String taskName) |
protected Collector<OT> |
createSolutionSetUpdateOutputCollector(Collector<OT> delegate)
Creates a new solution set update output collector.
|
protected Collector<OT> |
createWorksetUpdateOutputCollector() |
protected Collector<OT> |
createWorksetUpdateOutputCollector(Collector<OT> delegate)
Creates a new
WorksetUpdateOutputCollector. |
protected int |
currentIteration() |
RuntimeAggregatorRegistry |
getIterationAggregators() |
protected void |
incrementIterationCounter() |
protected boolean |
inFirstIteration() |
protected void |
initialize() |
void |
requestTermination() |
void |
run() |
boolean |
terminationRequested() |
protected void |
verifyEndOfSuperstepState() |
cancelChainedTasks, closeChainedTasks, closeUserCode, constructLogString, createInputIterator, excludeFromReset, formatLogString, getInput, getInputComparator, getInputSerializer, getIOManager, getLastOutputCollector, getLastTasksConfig, getMemoryManager, getNumTaskInputs, getOutputCollector, getOutputCollector, getOwningNepheleTask, getStub, getTaskConfig, getUserCodeClassLoader, initBroadcastInputReaders, initBroadcastInputsSerializers, initInputReaders, initInputsSerializersAndComparators, initLocalStrategies, initOutputs, initOutputs, initOutputWriters, initStub, instantiateUserCode, invoke, logAndThrowException, openChainedTasks, openUserCode, readAndSetBroadcastInput, registerInputOutput, reportAndClearAccumulators, resetAllInputs, setLastOutputCollector, setUserCodeClassLoadergetCurrentNumberOfSubtasks, getEnvironment, getIndexInSubtaskGroup, getJobConfiguration, getTaskConfiguration, setEnvironment, userThreadFinished, userThreadStartedprotected LongSumAggregator worksetAggregator
protected BlockingBackChannel worksetBackChannel
protected boolean isWorksetIteration
protected boolean isWorksetUpdate
protected boolean isSolutionSetUpdate
protected void initialize()
throws Exception
initialize in class RegularPactTask<S extends Function,OT>Exceptionpublic void run()
throws Exception
protected void closeLocalStrategiesAndCaches()
closeLocalStrategiesAndCaches in class RegularPactTask<S extends Function,OT>public RuntimeUDFContext createRuntimeContext(String taskName)
createRuntimeContext in class RegularPactTask<S extends Function,OT>protected boolean inFirstIteration()
protected int currentIteration()
protected void incrementIterationCounter()
public String brokerKey()
public RuntimeAggregatorRegistry getIterationAggregators()
protected void verifyEndOfSuperstepState()
throws IOException
IOExceptionpublic boolean terminationRequested()
terminationRequested in interface Terminablepublic void requestTermination()
requestTermination in interface Terminablepublic void cancel()
throws Exception
AbstractInvokableprotected Collector<OT> createWorksetUpdateOutputCollector(Collector<OT> delegate)
WorksetUpdateOutputCollector.
This collector is used by IterationIntermediatePactTask or IterationTailPactTask to update the
workset.
If a non-null delegate is given, the new Collector will write to the solution set and also call
collect(T) of the delegate.delegate - null -OR- the delegate on which to call collect() by the newly created collectorWorksetUpdateOutputCollectorprotected Collector<OT> createSolutionSetUpdateOutputCollector(Collector<OT> delegate)
IterationIntermediatePactTask or IterationTailPactTask to update the
solution set of workset iterations. Depending on the task configuration, either a fast (non-probing)
SolutionSetFastUpdateOutputCollector or normal (re-probing)
SolutionSetUpdateOutputCollector is created.
If a non-null delegate is given, the new Collector will write back to the solution set and also call
collect(T) of the delegate.delegate - null -OR- a delegate collector to be called by the newly created collectorSolutionSetFastUpdateOutputCollector or
SolutionSetUpdateOutputCollectorCopyright © 2014 The Apache Software Foundation. All rights reserved.