Class RetryHandlingJobMasterClient

  • All Implemented Interfaces:
    alluxio.Client, JobMasterClient, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public final class RetryHandlingJobMasterClient
    extends alluxio.AbstractJobMasterClient
    implements JobMasterClient
    A wrapper for the gRPC client to interact with the job service master, used by job service clients.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class alluxio.AbstractClient

        alluxio.AbstractClient.RpcCallable<V extends java.lang.Object>
    • Field Summary

      • Fields inherited from class alluxio.AbstractJobMasterClient

        mConfAddress
      • Fields inherited from class alluxio.AbstractClient

        mChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void afterConnect()  
      void cancel​(long jobId)
      Cancels the given job.
      java.util.List<alluxio.job.wire.JobWorkerHealth> getAllWorkerHealth()
      Gets all worker health.
      alluxio.job.wire.Status getCmdStatus​(long id)
      Gets the status of the given command jobControlId.
      alluxio.job.wire.CmdStatusBlock getCmdStatusDetailed​(long id)
      Gets the detailed status of the given command jobControlId.
      alluxio.job.wire.JobServiceSummary getJobServiceSummary()
      Gets the job service summary.
      alluxio.job.wire.JobInfo getJobStatus​(long id)
      Gets the status of the given job id.
      alluxio.job.wire.JobInfo getJobStatusDetailed​(long id)
      Gets detailed status of the given job id.
      protected alluxio.grpc.ServiceType getRemoteServiceType()  
      protected java.lang.String getServiceName()  
      protected long getServiceVersion()  
      java.util.List<java.lang.Long> list​(alluxio.grpc.ListAllPOptions option)  
      java.util.List<alluxio.job.wire.JobInfo> listDetailed()  
      long run​(alluxio.job.JobConfig jobConfig)
      Starts a plan based on the given configuration.
      long submit​(alluxio.job.CmdConfig cmdConfig)
      Submit a Cmd Job based on the given configuration.
      • Methods inherited from class alluxio.AbstractJobMasterClient

        getConfAddress
      • Methods inherited from class alluxio.AbstractMasterClient

        afterDisconnect, beforeConnect, queryGrpcServerAddress
      • Methods inherited from class alluxio.AbstractClient

        beforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, disconnect, getRemoteHostName, getRemoteServiceVersion, getRemoteSockAddress, isClosed, isConnected, retryRPC, retryRPC
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface alluxio.Client

        connect, disconnect, getConfAddress, getRemoteHostName, getRemoteSockAddress, isClosed, isConnected
      • Methods inherited from interface java.io.Closeable

        close
    • Constructor Detail

      • RetryHandlingJobMasterClient

        public RetryHandlingJobMasterClient​(JobMasterClientContext conf)
        Creates a new job master client.
        Parameters:
        conf - master client configuration
    • Method Detail

      • getRemoteServiceType

        protected alluxio.grpc.ServiceType getRemoteServiceType()
        Specified by:
        getRemoteServiceType in class alluxio.AbstractClient
      • getServiceName

        protected java.lang.String getServiceName()
        Specified by:
        getServiceName in class alluxio.AbstractClient
      • getServiceVersion

        protected long getServiceVersion()
        Specified by:
        getServiceVersion in class alluxio.AbstractClient
      • afterConnect

        protected void afterConnect()
                             throws java.io.IOException
        Overrides:
        afterConnect in class alluxio.AbstractClient
        Throws:
        java.io.IOException
      • cancel

        public void cancel​(long jobId)
                    throws java.io.IOException
        Description copied from interface: JobMasterClient
        Cancels the given job.
        Specified by:
        cancel in interface JobMasterClient
        Parameters:
        jobId - the job id
        Throws:
        java.io.IOException
      • getJobStatus

        public alluxio.job.wire.JobInfo getJobStatus​(long id)
                                              throws java.io.IOException
        Description copied from interface: JobMasterClient
        Gets the status of the given job id.
        Specified by:
        getJobStatus in interface JobMasterClient
        Parameters:
        id - the job id
        Returns:
        the job information
        Throws:
        java.io.IOException
      • getJobStatusDetailed

        public alluxio.job.wire.JobInfo getJobStatusDetailed​(long id)
                                                      throws java.io.IOException
        Description copied from interface: JobMasterClient
        Gets detailed status of the given job id.
        Specified by:
        getJobStatusDetailed in interface JobMasterClient
        Parameters:
        id - the job id
        Returns:
        the detailed job information
        Throws:
        java.io.IOException
      • getJobServiceSummary

        public alluxio.job.wire.JobServiceSummary getJobServiceSummary()
                                                                throws java.io.IOException
        Description copied from interface: JobMasterClient
        Gets the job service summary.
        Specified by:
        getJobServiceSummary in interface JobMasterClient
        Returns:
        the job service summary
        Throws:
        java.io.IOException
      • list

        public java.util.List<java.lang.Long> list​(alluxio.grpc.ListAllPOptions option)
                                            throws java.io.IOException
        Specified by:
        list in interface JobMasterClient
        Parameters:
        option - list options
        Returns:
        the list of ids of all jobs
        Throws:
        java.io.IOException
      • listDetailed

        public java.util.List<alluxio.job.wire.JobInfo> listDetailed()
                                                              throws java.io.IOException
        Specified by:
        listDetailed in interface JobMasterClient
        Returns:
        the list of all jobInfos
        Throws:
        java.io.IOException
      • run

        public long run​(alluxio.job.JobConfig jobConfig)
                 throws java.io.IOException
        Description copied from interface: JobMasterClient
        Starts a plan based on the given configuration.
        Specified by:
        run in interface JobMasterClient
        Parameters:
        jobConfig - the job configuration
        Returns:
        the plan id
        Throws:
        java.io.IOException
      • submit

        public long submit​(alluxio.job.CmdConfig cmdConfig)
                    throws java.io.IOException
        Description copied from interface: JobMasterClient
        Submit a Cmd Job based on the given configuration.
        Specified by:
        submit in interface JobMasterClient
        Parameters:
        cmdConfig - the Cmd job config
        Returns:
        the jobControlId
        Throws:
        java.io.IOException
      • getAllWorkerHealth

        public java.util.List<alluxio.job.wire.JobWorkerHealth> getAllWorkerHealth()
                                                                            throws java.io.IOException
        Description copied from interface: JobMasterClient
        Gets all worker health.
        Specified by:
        getAllWorkerHealth in interface JobMasterClient
        Returns:
        list of all worker health information
        Throws:
        java.io.IOException
      • getCmdStatus

        public alluxio.job.wire.Status getCmdStatus​(long id)
                                             throws java.io.IOException
        Description copied from interface: JobMasterClient
        Gets the status of the given command jobControlId.
        Specified by:
        getCmdStatus in interface JobMasterClient
        Parameters:
        id - the jobControl id
        Returns:
        the command status
        Throws:
        java.io.IOException
      • getCmdStatusDetailed

        public alluxio.job.wire.CmdStatusBlock getCmdStatusDetailed​(long id)
                                                             throws java.io.IOException
        Description copied from interface: JobMasterClient
        Gets the detailed status of the given command jobControlId.
        Specified by:
        getCmdStatusDetailed in interface JobMasterClient
        Parameters:
        id - the jobControl id
        Returns:
        the detailed command status information
        Throws:
        java.io.IOException