Interface Task
-
- All Superinterfaces:
java.io.Serializable,SerializableObject
- All Known Implementing Classes:
TaskEnd,TaskGettingResult,TaskStart
public interface Task extends SerializableObject
The Task interface represents a task in a distributed computing or data processing system.This interface extends the SerializableObject interface and defines the methods that should be implemented by a task in order to properly function in such a system.
The Task interface provides methods for setting and getting various properties of a task, including its ID, status, and execution metrics.
The Task interface also includes an enum for representing the status of a task while it is running.
- Author:
- [Adeel Aslam]
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTask.TaskStatusForRunningThe TaskStatusForRunning enum represents the possible statuses of a task while it is running.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetDurationTime()Returns the duration time of this task.java.lang.StringgetEventName()Gets the name of the event associated with this task.java.lang.StringgetExecutorID()Returns the ID of the executor assigned to this task.longgetFinishTime()Returns the finish time of this task.longgetGettingTime()Returns the getting time of this task.java.lang.StringgetHostIP()Gets the IP address of the host machine executing this task.java.lang.StringgetID()Gets the ID of this task.intgetIndex()Returns the index of this task.longgetLaunchTime()Returns the launch time of this task.intgetPartition()Returns the partition of this task.intgetStageID()Returns the ID of the stage to which this task belongs.longgetTaskID()Returns the ID of this task.TaskMetricgetTaskMetric()Returns theTaskMetricassociated with this task.booleangetTaskSatus()Returns the status of this task.java.lang.StringgetTaskStatus()Returns the status of this task.Task.TaskStatusForRunninggetTaskStatusForRunning()Returns the current task status for running.voidsetDurationTime(long time)Sets the duration time of this task.voidsetEventame(java.lang.String name)Sets the name of the event associated with this task.voidsetFinishTime(long time)Sets the finish time of this task.voidsetGettingTime(long time)Sets the getting time of this task.voidsetHostIP(java.lang.String Ip)Sets the IP address of the host machine executing this task.voidsetID(java.lang.String id)Sets the ID of this task.voidsetIndex(int index)Sets the index of this task.voidsetLaunchTime(long time)Sets the launch time of this task.voidsetPartition(int partition)Sets the partition of this task.voidsetStageID(int id)Sets the ID of the stage to which this task belongs.voidsetStringExecutorID(java.lang.String executorID)Sets the ID of the executor assigned to this task.voidsetTaskID(long taskId)Sets the ID of this task.voidsetTaskMetric(TaskMetric taskMetric)Sets theTaskMetricassociated with this task.voidsetTaskStatus(boolean status)Sets the status of this task.voidsetTaskStatus(java.lang.String status)Sets the status of this task.voidsetTaskStatusForRunning(Task.TaskStatusForRunning taskStatusForRunning)Sets the task status for running.
-
-
-
Method Detail
-
setEventame
void setEventame(java.lang.String name)
Sets the name of the event associated with this task.- Parameters:
name- the name of the event
-
getEventName
java.lang.String getEventName()
Gets the name of the event associated with this task.- Returns:
- the name of the event
-
setID
void setID(java.lang.String id)
Sets the ID of this task.- Parameters:
id- the task ID
-
getID
java.lang.String getID()
Gets the ID of this task.- Returns:
- the task ID
-
setHostIP
void setHostIP(java.lang.String Ip)
Sets the IP address of the host machine executing this task.- Parameters:
Ip- the IP address of the host machine
-
getHostIP
java.lang.String getHostIP()
Gets the IP address of the host machine executing this task.- Returns:
- the IP address of the host machine
-
setTaskID
void setTaskID(long taskId)
Sets the ID of this task.- Parameters:
taskId- the ID of this task
-
setStageID
void setStageID(int id)
Sets the ID of the stage to which this task belongs.- Parameters:
id- the ID of the stage to which this task belongs
-
getStageID
int getStageID()
Returns the ID of the stage to which this task belongs.- Returns:
- the ID of the stage to which this task belongs
-
getTaskID
long getTaskID()
Returns the ID of this task.- Returns:
- the ID of this task
-
setStringExecutorID
void setStringExecutorID(java.lang.String executorID)
Sets the ID of the executor assigned to this task.- Parameters:
executorID- the ID of the executor assigned to this task
-
getExecutorID
java.lang.String getExecutorID()
Returns the ID of the executor assigned to this task.- Returns:
- the ID of the executor assigned to this task
-
setTaskStatus
void setTaskStatus(java.lang.String status)
Sets the status of this task.- Parameters:
status- the status of this task
-
getTaskStatus
java.lang.String getTaskStatus()
Returns the status of this task.- Returns:
- the status of this task
-
setIndex
void setIndex(int index)
Sets the index of this task.- Parameters:
index- the index of this task
-
getIndex
int getIndex()
Returns the index of this task.- Returns:
- the index of this task
-
setPartition
void setPartition(int partition)
Sets the partition of this task.- Parameters:
partition- the partition of this task
-
getPartition
int getPartition()
Returns the partition of this task.- Returns:
- the partition of this task
-
setLaunchTime
void setLaunchTime(long time)
Sets the launch time of this task.- Parameters:
time- the launch time of this task
-
getLaunchTime
long getLaunchTime()
Returns the launch time of this task.- Returns:
- the launch time of this task
-
setFinishTime
void setFinishTime(long time)
Sets the finish time of this task.- Parameters:
time- the finish time of this task
-
getFinishTime
long getFinishTime()
Returns the finish time of this task.- Returns:
- the finish time of this task
-
setGettingTime
void setGettingTime(long time)
Sets the getting time of this task.- Parameters:
time- the getting time of this task
-
getGettingTime
long getGettingTime()
Returns the getting time of this task.- Returns:
- the getting time of this task
-
setDurationTime
void setDurationTime(long time)
Sets the duration time of this task.- Parameters:
time- the duration time of this task
-
getDurationTime
long getDurationTime()
Returns the duration time of this task.- Returns:
- the duration time of this task
-
setTaskStatus
void setTaskStatus(boolean status)
Sets the status of this task.- Parameters:
status- the status of this task
-
getTaskSatus
boolean getTaskSatus()
Returns the status of this task.- Returns:
- the status of this task
-
setTaskStatusForRunning
void setTaskStatusForRunning(Task.TaskStatusForRunning taskStatusForRunning)
Sets the task status for running.- Parameters:
taskStatusForRunning- theTask.TaskStatusForRunningstatus to be set for the task
-
getTaskStatusForRunning
Task.TaskStatusForRunning getTaskStatusForRunning()
Returns the current task status for running.- Returns:
- the
Task.TaskStatusForRunningstatus of the task
-
getTaskMetric
TaskMetric getTaskMetric()
Returns theTaskMetricassociated with this task.- Returns:
- the
TaskMetricof the task
-
setTaskMetric
void setTaskMetric(TaskMetric taskMetric)
Sets theTaskMetricassociated with this task.- Parameters:
taskMetric- theTaskMetricto be set for the task
-
-