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() |
java.util.OptionalLong |
getEndTime() |
java.lang.String |
getJobId() |
JobState |
getJobState() |
java.util.List<T> |
getNextTasks(java.util.Set<WorkerInfo> workers) |
java.lang.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.
|
void |
onWorkerUnavailable(T task)
Triggers when a worker is not available caused by membership changes.
|
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()
java.util.OptionalLong getEndTime()
boolean needVerification()
JobState getJobState()
void setJobState(JobState state, boolean journalUpdate)
state - job statejournalUpdate - true if needs to journal the updatejava.lang.String getJobId()
void failJob(AlluxioRuntimeException reason)
reason - exceptionvoid setJobSuccess()
java.lang.String getProgress(JobProgressReportFormat format, boolean verbose)
format - progress report formatverbose - whether to include detailed informationjava.lang.IllegalArgumentException - if the format is not supportedboolean isHealthy()
boolean isRunning()
boolean isDone()
boolean isCurrentPassDone()
void initiateVerification()
java.util.List<T> getNextTasks(java.util.Set<WorkerInfo> workers)
workers - blocker to workerAlluxioRuntimeException - if any error occurs when getting next taskvoid onTaskSubmitFailure(Task<?> task)
task - void onWorkerUnavailable(T task)
task - the task to execute on the workerJournal.JournalEntry toJournalEntry()
boolean processResponse(T task)
task - task containing result futureboolean hasFailure()
void initializeJob()
Copyright © 2024. All Rights Reserved.