public class CommonIdUtils
extends java.lang.Object
Protos.TaskInfos.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME_ID_DELIM
Used in task and executor IDs to separate the task/executor name from a UUID.
|
| Modifier and Type | Method and Description |
|---|---|
static SlaveID |
emptyAgentId() |
static ExecutorID |
emptyExecutorId() |
static TaskID |
emptyTaskId() |
static Protos.ExecutorID |
toExecutorId(java.lang.String executorName)
Converts the Framework defined Executor name into a unique
Protos.ExecutorID. |
static java.lang.String |
toExecutorName(Protos.ExecutorID executorId)
Converts the unique
Protos.ExecutorID into a Framework defined executor name. |
static TaskID |
toTaskId(java.lang.String taskName)
Converts the Framework defined task name into a unique
TaskID. |
static java.lang.String |
toTaskName(TaskID taskId)
Converts the unique
TaskID into a Framework defined task name. |
public static final java.lang.String NAME_ID_DELIM
public static java.lang.String toTaskName(TaskID taskId)
throws TaskException
TaskID into a Framework defined task name.
For example: "instance-0__aoeu5678" => "instance-0"
TaskExceptiontoTaskId(String)public static TaskID toTaskId(java.lang.String taskName)
TaskID.
For example: "instance-0" => "instance-0__aoeu5678"
toTaskName(TaskID)public static java.lang.String toExecutorName(Protos.ExecutorID executorId)
throws TaskException
Protos.ExecutorID into a Framework defined executor name.
For example: "instance-0_aoeu5678" => "instance-0"
TaskExceptiontoExecutorId(String)public static Protos.ExecutorID toExecutorId(java.lang.String executorName)
Protos.ExecutorID.
For example: "instance-0" => "instance-0_aoeu5678"
#toExecutorName(ExecutorID)public static TaskID emptyTaskId()
public static SlaveID emptyAgentId()
public static ExecutorID emptyExecutorId()