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() |
List<T> |
getNextTasks(Collection<WorkerInfo> workers) |
String |
getProgress(JobProgressReportFormat format,
boolean verbose)
Get job progress.
|
boolean |
hasFailure() |
void |
initializeJob()
Initialize the job before kick it running.
|
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() |
void |
onTaskSubmitFailure(Task<?> task)
Define how to process task that gets rejected when scheduler tried to kick off.
|
boolean |
processResponse(T task)
process task result.
|
void |
setJobState(JobState state,
boolean journalUpdate)
set job state.
|
void |
setJobSuccess()
set job as success.
|
Journal.JournalEntry |
toJournalEntry() |
JobDescription getDescription()
OptionalLong getEndTime()
boolean needVerification()
JobState getJobState()
void setJobState(JobState state, boolean journalUpdate)
state
- job statejournalUpdate
- true if needs to journal the updateString getJobId()
void failJob(AlluxioRuntimeException reason)
reason
- exceptionvoid setJobSuccess()
String 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()
List<T> getNextTasks(Collection<WorkerInfo> workers)
workers
- blocker to workerAlluxioRuntimeException
- if any error occurs when getting next taskvoid onTaskSubmitFailure(Task<?> task)
task
- Journal.JournalEntry toJournalEntry()
boolean processResponse(T task)
task
- task containing result futureboolean hasFailure()
void initializeJob()
Copyright © 2023. All Rights Reserved.