public interface TaskGenerator
Modifier and Type | Method and Description |
---|---|
java.util.List<Task> |
createCompletionTasks(java.util.Map<java.lang.String,Bucket> inputBuckets,
java.util.Map<java.lang.String,Bucket> outputBuckets,
AnyMap parameters,
java.lang.String workerName)
Creates tasks for the completion workflow run, i.e. the run just before the job run is completed to to some
cleanup/completion work.
|
java.util.List<Task> |
createRunOnceTasks(java.util.Map<java.lang.String,Bucket> inputBuckets,
java.util.Map<java.lang.String,Bucket> outputBuckets,
AnyMap parameters,
java.lang.String workerName)
Creates tasks for the RunOnce mode, i.e. for all objects in the input bucket of the start action.
|
java.util.List<Task> |
createTasks(java.util.Map<java.lang.String,java.util.List<BulkInfo>> changedInput,
java.util.Map<java.lang.String,Bucket> inputBuckets,
java.util.Map<java.lang.String,Bucket> outputBuckets,
AnyMap parameters,
java.lang.String workerName) |
void |
finishTask(Task task,
TaskCompletionStatus taskState) |
java.lang.String |
getName() |
void |
validateParameters(AnyMap parameters)
Check complex parameters in some task generators if desired.
|
java.lang.String getName()
java.util.List<Task> createTasks(java.util.Map<java.lang.String,java.util.List<BulkInfo>> changedInput, java.util.Map<java.lang.String,Bucket> inputBuckets, java.util.Map<java.lang.String,Bucket> outputBuckets, AnyMap parameters, java.lang.String workerName) throws TaskGeneratorException
changedInput
- key: slot containing added bulks, value: added bulksinputBuckets
- key: input slot name, value: bucket for this slotoutputBuckets
- key: output slot name, value: bucket for this slotparameters
- key: param name, value: (evaluated) param valueworkerName
- (action) worker for which to create new tasksTaskGeneratorException
- error while generating tasksvoid finishTask(Task task, TaskCompletionStatus taskState) throws TaskGeneratorException
task
- The task to be cleaned uptaskState
- TODOTaskGeneratorException
- error while cleaning up for finished taskjava.util.List<Task> createRunOnceTasks(java.util.Map<java.lang.String,Bucket> inputBuckets, java.util.Map<java.lang.String,Bucket> outputBuckets, AnyMap parameters, java.lang.String workerName) throws TaskGeneratorException
inputBuckets
- key: input slot name, value: bucket for this slotoutputBuckets
- key: output slot name, value: bucket for this slotparameters
- key: param name, value: (evaluated) param valueworkerName
- (action) worker for which to create new tasksTaskGeneratorException
- error while generating tasksjava.util.List<Task> createCompletionTasks(java.util.Map<java.lang.String,Bucket> inputBuckets, java.util.Map<java.lang.String,Bucket> outputBuckets, AnyMap parameters, java.lang.String workerName) throws TaskGeneratorException
inputBuckets
- key: input slot name, value: bucket for this slotoutputBuckets
- key: output slot name, value: bucket for this slotparameters
- key: param name, value: (evaluated) param valueworkerName
- (action) worker for which to create new tasksTaskGeneratorException
- error while generating tasksvoid validateParameters(AnyMap parameters) throws TaskGeneratorException
parameters
- The map with the parametersTaskGeneratorException
- an exception if something is wrong with the parameters