@NotThreadSafe public class TaskInfo extends Object implements JobInfo
Constructor and Description |
---|
TaskInfo()
Default constructor.
|
TaskInfo(JobInfo taskInfo)
Constructs from the proto format.
|
TaskInfo(long jobId,
long taskId,
Status status,
WorkerNetAddress workerAddress,
Object args)
Constructs a new TaskInfo from jobId, taskId, Status, workerAddress, and arguments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<JobInfo> |
getChildren() |
String |
getDescription() |
String |
getErrorMessage() |
String |
getErrorType() |
long |
getId() |
long |
getJobId() |
long |
getLastUpdated() |
String |
getName() |
Long |
getParentId() |
Serializable |
getResult() |
Status |
getStatus() |
long |
getTaskId() |
Object |
getWorkerHost() |
int |
hashCode() |
void |
setDescription(String description) |
TaskInfo |
setErrorMessage(String errorMessage) |
TaskInfo |
setErrorType(String errorType) |
TaskInfo |
setJobId(long jobId) |
TaskInfo |
setResult(Serializable result) |
TaskInfo |
setStatus(Status status) |
TaskInfo |
setTaskId(long taskId) |
TaskInfo |
setWorkerHost(String workerHost) |
JobInfo |
toProto() |
String |
toString() |
public TaskInfo()
public TaskInfo(long jobId, long taskId, Status status, WorkerNetAddress workerAddress, Object args)
jobId
- the job idtaskId
- the task idstatus
- the statusworkerAddress
- the worker addressargs
- the (Serializable) arguments that were used to execute the taskpublic TaskInfo(JobInfo taskInfo) throws IOException
taskInfo
- the task info in proto formatIOException
- if the deserialization failspublic long getTaskId()
public TaskInfo setTaskId(long taskId)
taskId
- the task idpublic Long getParentId()
getParentId
in interface JobInfo
public long getJobId()
public Object getWorkerHost()
public TaskInfo setJobId(long jobId)
jobId
- the job idpublic String getDescription()
getDescription
in interface JobInfo
public void setDescription(String description)
description
- the descriptionpublic Status getStatus()
public TaskInfo setStatus(Status status)
status
- the task statuspublic long getLastUpdated()
getLastUpdated
in interface JobInfo
public List<JobInfo> getChildren()
getChildren
in interface JobInfo
public String getErrorType()
getErrorType
in interface JobInfo
public TaskInfo setErrorType(String errorType)
errorType
- the error typepublic String getErrorMessage()
getErrorMessage
in interface JobInfo
public TaskInfo setErrorMessage(String errorMessage)
errorMessage
- the error messagepublic Serializable getResult()
public TaskInfo setResult(Serializable result)
result
- the resultpublic TaskInfo setWorkerHost(String workerHost)
workerHost
- the worker hostpublic JobInfo toProto()
toProto
in interface JobInfo
IOException
- if serialization failsCopyright © 2023. All Rights Reserved.