public class WorkflowTracker extends Object
WorkflowTracker
.Constructor and Description |
---|
WorkflowTracker(JobMaster jobMaster)
Constructor for
WorkflowTracker . |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(long jobId)
Cancels a job with a particular job id.
|
void |
cleanup(Collection<Long> removedPlanIds)
Recursively cleanup the parent workflows given plans to be removed from the PlanTracker.
|
Set<Long> |
findJobs(String name,
List<Status> statusList) |
Collection<WorkflowInfo> |
getAllInfo() |
WorkflowInfo |
getStatus(long jobId,
boolean verbose)
Gets information of the given job id.
|
Collection<Long> |
list() |
void |
onPlanStatusChange(PlanInfo planInfo)
Updates internal state of the workflows based on the updated state of a plan.
|
void |
run(WorkflowConfig workflowConfig,
long jobId)
Runs a workflow with the given configuration and job id.
|
public WorkflowTracker(JobMaster jobMaster)
WorkflowTracker
.jobMaster
- the job masterpublic void run(WorkflowConfig workflowConfig, long jobId) throws JobDoesNotExistException, ResourceExhaustedException
workflowConfig
- the workflow configurationjobId
- the job idJobDoesNotExistException
ResourceExhaustedException
public boolean cancel(long jobId)
jobId
- the job idpublic WorkflowInfo getStatus(long jobId, boolean verbose)
jobId
- the id of the jobverbose
- whether the output should be verbosepublic Collection<WorkflowInfo> getAllInfo()
public Set<Long> findJobs(String name, List<Status> statusList)
name
- job name filterstatusList
- status list filterpublic Collection<Long> list()
public void cleanup(Collection<Long> removedPlanIds)
removedPlanIds
- the plan ids that are being cleaned up by PlanTrackerpublic void onPlanStatusChange(PlanInfo planInfo)
planInfo
- info of the plan that had its status changedCopyright © 2023. All Rights Reserved.