Class JobGrpcClientUtils


  • @ThreadSafe
    public final class JobGrpcClientUtils
    extends java.lang.Object
    Utils 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.JobInfo getJobStatus​(long jobId, alluxio.conf.AlluxioConfiguration alluxioConf, boolean verbose)  
      static long run​(alluxio.job.JobConfig config, int attempts, alluxio.conf.AlluxioConfiguration alluxioConf)
      Runs the specified job and waits for it to finish.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 id
        alluxioConf - the Alluxio configuration
        verbose - if true, will return the detailed job info
        Returns:
        the JobInfo for 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.InterruptedException
        Runs 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 run
        attempts - number of times to try running the job before giving up
        alluxioConf - Alluxio configuration
        Returns:
        the job id of the job
        Throws:
        java.lang.InterruptedException