Package alluxio.job.plan.meta
Class PlanInfo
- java.lang.Object
-
- alluxio.job.plan.meta.PlanInfo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTask(long taskId, alluxio.wire.WorkerInfo workerInfo, java.lang.Object args)Registers a task.intcompareTo(PlanInfo other)This method orders jobs using the time their status was last modified.booleanequals(java.lang.Object o)java.lang.StringgetErrorMessage()java.lang.StringgetErrorType()longgetId()JobConfiggetJobConfig()longgetLastStatusChangeMs()java.lang.StringgetResult()StatusgetStatus()java.util.List<java.lang.Long>getTaskIdList()TaskInfogetTaskInfo(long taskId)java.util.List<TaskInfo>getTaskInfoList()inthashCode()voidsetErrorMessage(java.lang.String errorMessage)voidsetErrorType(java.lang.String errorType)voidsetResult(java.lang.String result)voidsetStatus(Status status)Sets the status of a job.voidsetTaskInfo(long taskId, TaskInfo taskInfo)Sets the information of a task.
-
-
-
Method Detail
-
compareTo
public int compareTo(PlanInfo other)
This method orders jobs using the time their status was last modified. If the status is equal, they are compared by jobId- Specified by:
compareToin interfacejava.lang.Comparable<PlanInfo>
-
addTask
public void addTask(long taskId, alluxio.wire.WorkerInfo workerInfo, java.lang.Object args)Registers a task.- Parameters:
taskId- the task idworkerInfo- the worker infoargs- the arguments
-
getId
public long getId()
- Returns:
- the job id
-
getJobConfig
public JobConfig getJobConfig()
- Returns:
- the job configuration
-
getLastStatusChangeMs
public long getLastStatusChangeMs()
- Returns:
- the time when the job status was last changed (in milliseconds)
-
setErrorType
public void setErrorType(java.lang.String errorType)
- Parameters:
errorType- the error type
-
getErrorType
public java.lang.String getErrorType()
- Returns:
- the error type
-
setErrorMessage
public void setErrorMessage(java.lang.String errorMessage)
- Parameters:
errorMessage- the error message
-
getErrorMessage
public java.lang.String getErrorMessage()
- Returns:
- the error message
-
getTaskInfo
public TaskInfo getTaskInfo(long taskId)
- Parameters:
taskId- the task ID to get the task info for- Returns:
- the task info, or null if the task ID doesn't exist
-
setTaskInfo
public void setTaskInfo(long taskId, TaskInfo taskInfo)Sets the information of a task.- Parameters:
taskId- the task idtaskInfo- the task information
-
getTaskIdList
public java.util.List<java.lang.Long> getTaskIdList()
- Returns:
- the list of task ids
-
setStatus
public void setStatus(Status status)
Sets the status of a job. A job can only move from one status to another if the job hasn't already finished. If a job is finished and the caller tries to change the status, this method is a no-op.- Parameters:
status- the job status
-
getStatus
public Status getStatus()
- Returns:
- the status of the job
-
setResult
public void setResult(java.lang.String result)
- Parameters:
result- the joined job result
-
getResult
public java.lang.String getResult()
- Returns:
- the result of the job
-
getTaskInfoList
public java.util.List<TaskInfo> getTaskInfoList()
- Returns:
- the list of task information
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-