Class TaskInfo

  • All Implemented Interfaces:
    JobInfo

    @NotThreadSafe
    public class TaskInfo
    extends java.lang.Object
    implements JobInfo
    The task description.
    • Constructor Detail

      • TaskInfo

        public TaskInfo()
        Default constructor.
      • TaskInfo

        public TaskInfo​(long jobId,
                        long taskId,
                        Status status,
                        alluxio.wire.WorkerNetAddress workerAddress,
                        java.lang.Object args)
        Constructs a new TaskInfo from jobId, taskId, Status, workerAddress, and arguments.
        Parameters:
        jobId - the job id
        taskId - the task id
        status - the status
        workerAddress - the worker address
        args - the (Serializable) arguments that were used to execute the task
      • TaskInfo

        public TaskInfo​(alluxio.grpc.JobInfo taskInfo)
                 throws java.io.IOException
        Constructs from the proto format.
        Parameters:
        taskInfo - the task info in proto format
        Throws:
        java.io.IOException - if the deserialization fails
    • Method Detail

      • getId

        public long getId()
        Specified by:
        getId in interface JobInfo
        Returns:
        job id
      • getTaskId

        public long getTaskId()
        Returns:
        the task id
      • setTaskId

        public TaskInfo setTaskId​(long taskId)
        Parameters:
        taskId - the task id
        Returns:
        the updated task info object
      • getParentId

        public java.lang.Long getParentId()
        Specified by:
        getParentId in interface JobInfo
        Returns:
        parent job id
      • getJobId

        public long getJobId()
        Returns:
        the job id
      • getWorkerHost

        public java.lang.Object getWorkerHost()
        Returns:
        the worker host
      • setJobId

        public TaskInfo setJobId​(long jobId)
        Parameters:
        jobId - the job id
        Returns:
        the updated task info object
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface JobInfo
        Returns:
        name of the job
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface JobInfo
        Returns:
        description of the job
      • setDescription

        public void setDescription​(java.lang.String description)
        Parameters:
        description - the description
      • getStatus

        public Status getStatus()
        Specified by:
        getStatus in interface JobInfo
        Returns:
        status of the job
      • setStatus

        public TaskInfo setStatus​(Status status)
        Parameters:
        status - the task status
        Returns:
        the updated task info object
      • getLastUpdated

        public long getLastUpdated()
        Specified by:
        getLastUpdated in interface JobInfo
        Returns:
        last updated time in milliseconds
      • getChildren

        public java.util.List<JobInfo> getChildren()
        Specified by:
        getChildren in interface JobInfo
        Returns:
        collection of children
      • getErrorType

        public java.lang.String getErrorType()
        Specified by:
        getErrorType in interface JobInfo
        Returns:
        the error type
      • setErrorType

        public TaskInfo setErrorType​(java.lang.String errorType)
        Parameters:
        errorType - the error type
        Returns:
        the updated task info object
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Specified by:
        getErrorMessage in interface JobInfo
        Returns:
        the error message
      • setErrorMessage

        public TaskInfo setErrorMessage​(java.lang.String errorMessage)
        Parameters:
        errorMessage - the error message
        Returns:
        the updated task info object
      • getResult

        public java.io.Serializable getResult()
        Specified by:
        getResult in interface JobInfo
        Returns:
        the result
      • setResult

        public TaskInfo setResult​(java.io.Serializable result)
        Parameters:
        result - the result
        Returns:
        the updated task info object
      • setWorkerHost

        public TaskInfo setWorkerHost​(java.lang.String workerHost)
        Parameters:
        workerHost - the worker host
        Returns:
        the updated task info object
      • toProto

        public alluxio.grpc.JobInfo toProto()
        Specified by:
        toProto in interface JobInfo
        Returns:
        proto representation of the task info
        Throws:
        java.io.IOException - if serialization fails
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object