Package alluxio.job.wire
Class TaskInfo
- java.lang.Object
-
- alluxio.job.wire.TaskInfo
-
-
Constructor Summary
Constructors Constructor Description TaskInfo()Default constructor.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.TaskInfo(alluxio.grpc.JobInfo taskInfo)Constructs from the proto format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<JobInfo>getChildren()java.lang.StringgetDescription()java.lang.StringgetErrorMessage()java.lang.StringgetErrorType()longgetId()longgetJobId()longgetLastUpdated()java.lang.StringgetName()java.lang.LonggetParentId()java.io.SerializablegetResult()StatusgetStatus()longgetTaskId()java.lang.ObjectgetWorkerHost()inthashCode()voidsetDescription(java.lang.String description)TaskInfosetErrorMessage(java.lang.String errorMessage)TaskInfosetErrorType(java.lang.String errorType)TaskInfosetJobId(long jobId)TaskInfosetResult(java.io.Serializable result)TaskInfosetStatus(Status status)TaskInfosetTaskId(long taskId)TaskInfosetWorkerHost(java.lang.String workerHost)alluxio.grpc.JobInfotoProto()java.lang.StringtoString()
-
-
-
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 idtaskId- the task idstatus- the statusworkerAddress- the worker addressargs- the (Serializable) arguments that were used to execute the task
-
TaskInfo
public TaskInfo(alluxio.grpc.JobInfo taskInfo) throws java.io.IOExceptionConstructs from the proto format.- Parameters:
taskInfo- the task info in proto format- Throws:
java.io.IOException- if the deserialization fails
-
-
Method Detail
-
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:
getParentIdin interfaceJobInfo- 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()
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceJobInfo- Returns:
- description of the job
-
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description- the description
-
getStatus
public Status getStatus()
-
setStatus
public TaskInfo setStatus(Status status)
- Parameters:
status- the task status- Returns:
- the updated task info object
-
getLastUpdated
public long getLastUpdated()
- Specified by:
getLastUpdatedin interfaceJobInfo- Returns:
- last updated time in milliseconds
-
getChildren
public java.util.List<JobInfo> getChildren()
- Specified by:
getChildrenin interfaceJobInfo- Returns:
- collection of children
-
getErrorType
public java.lang.String getErrorType()
- Specified by:
getErrorTypein interfaceJobInfo- 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:
getErrorMessagein interfaceJobInfo- 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()
-
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()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-