Package alluxio.client.job
Class JobGrpcClientUtils
- java.lang.Object
-
- alluxio.client.job.JobGrpcClientUtils
-
@ThreadSafe public final class JobGrpcClientUtils extends java.lang.ObjectUtils for interacting with the job service through a gRPC client.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static alluxio.job.wire.JobInfogetJobStatus(long jobId, alluxio.conf.AlluxioConfiguration alluxioConf, boolean verbose)static longrun(alluxio.job.JobConfig config, int attempts, alluxio.conf.AlluxioConfiguration alluxioConf)Runs the specified job and waits for it to finish.
-
-
-
Method Detail
-
getJobStatus
public static alluxio.job.wire.JobInfo getJobStatus(long jobId, alluxio.conf.AlluxioConfiguration alluxioConf, boolean verbose) throws java.io.IOException- Parameters:
jobId- the job idalluxioConf- the Alluxio configurationverbose- if true, will return the detailed job info- Returns:
- the
JobInfofor the job id - Throws:
java.io.IOException
-
run
public static long run(alluxio.job.JobConfig config, int attempts, alluxio.conf.AlluxioConfiguration alluxioConf) throws java.lang.InterruptedExceptionRuns the specified job and waits for it to finish. If the job fails, it is retried the given number of times. If the job does not complete in the given number of attempts, an exception is thrown.- Parameters:
config- configuration for the job to runattempts- number of times to try running the job before giving upalluxioConf- Alluxio configuration- Returns:
- the job id of the job
- Throws:
java.lang.InterruptedException
-
-