T
- the type of the task of the jobpublic interface Job<T extends Task<?>>
Modifier and Type | Method and Description |
---|---|
void |
failJob(AlluxioRuntimeException reason)
set job as failure with exception.
|
JobDescription |
getDescription() |
OptionalLong |
getEndTime() |
String |
getJobId() |
JobState |
getJobState() |
Optional<T> |
getNextTask(WorkerInfo worker) |
String |
getProgress(JobProgressReportFormat format,
boolean verbose)
Get job progress.
|
void |
initiateVerification()
Initiate a verification pass.
|
boolean |
isCurrentPassDone()
Check whether the current pass is finished.
|
boolean |
isDone()
Check whether the job is finished.
|
boolean |
isHealthy()
Check whether the job is healthy.
|
boolean |
isRunning()
Check whether the job is still running.
|
boolean |
needVerification() |
boolean |
processResponse(T task)
process task result.
|
void |
setJobState(JobState state)
set job state.
|
Journal.JournalEntry |
toJournalEntry() |
void |
updateJob(Job<?> job)
update job configs.
|
JobDescription getDescription()
OptionalLong getEndTime()
boolean needVerification()
JobState getJobState()
void setJobState(JobState state)
state
- job stateString getJobId()
void failJob(AlluxioRuntimeException reason)
reason
- exceptionString getProgress(JobProgressReportFormat format, boolean verbose)
format
- progress report formatverbose
- whether to include detailed informationIllegalArgumentException
- if the format is not supportedboolean isHealthy()
boolean isRunning()
boolean isDone()
boolean isCurrentPassDone()
void initiateVerification()
Optional<T> getNextTask(WorkerInfo worker)
worker
- blocker to workerAlluxioRuntimeException
- if any error occurs when getting next taskJournal.JournalEntry toJournalEntry()
boolean processResponse(T task)
task
- task containing result futurevoid updateJob(Job<?> job)
job
- the job to update from. Must be the same job typeCopyright © 2023. All Rights Reserved.