Package alluxio.cli.fs.command.job
Class JobAttempt
- java.lang.Object
-
- alluxio.cli.fs.command.job.JobAttempt
-
public abstract class JobAttempt extends java.lang.ObjectAbstract class for handling submission for a job.
-
-
Field Summary
Fields Modifier and Type Field Description protected alluxio.client.job.JobMasterClientmClientprotected java.util.Set<java.lang.String>mFailedFilesprotected java.util.Set<alluxio.job.wire.JobInfo>mFailedTasksprotected alluxio.retry.RetryPolicymRetryPolicy
-
Constructor Summary
Constructors Modifier Constructor Description protectedJobAttempt(alluxio.client.job.JobMasterClient client, alluxio.retry.RetryPolicy retryPolicy)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description alluxio.job.wire.Statuscheck()Returns the status of the job attempt.java.util.Set<java.lang.String>getFailedFiles()Get failed files if there's any.abstract alluxio.job.JobConfiggetJobConfig()Get job config.abstract intgetSize()Get how many files contained in job attempt.protected abstract voidlogCompleted()protected abstract voidlogFailed()protected abstract voidlogFailedAttempt(alluxio.job.wire.JobInfo jobInfo)booleanrun()Runs the job.protected abstract voidsetFailedFiles()
-
-
-
Method Detail
-
run
public boolean run()
Runs the job.- Returns:
- true if an attempt was made, false if attempts ran out
-
check
public alluxio.job.wire.Status check()
Returns the status of the job attempt.- Returns:
- True if finished successfully or cancelled, False if FAILED and should be retried, null if the status should be checked again later
-
getJobConfig
public abstract alluxio.job.JobConfig getJobConfig()
Get job config.- Returns:
- job config
-
getSize
public abstract int getSize()
Get how many files contained in job attempt.- Returns:
- number of files
-
getFailedFiles
public java.util.Set<java.lang.String> getFailedFiles()
Get failed files if there's any. Only call this function after confirm job status is FAILED!- Returns:
- failed fail set
-
setFailedFiles
protected abstract void setFailedFiles()
-
logFailedAttempt
protected abstract void logFailedAttempt(alluxio.job.wire.JobInfo jobInfo)
-
logFailed
protected abstract void logFailed()
-
logCompleted
protected abstract void logCompleted()
-
-