public static final class Protos.Task extends com.google.protobuf.GeneratedMessageV3 implements Protos.TaskOrBuilder
Describes a task, similar to `TaskInfo`.
`Task` is used in some of the Mesos messages found below.
`Task` is used instead of `TaskInfo` if:
1) we need additional IDs, such as a specific
framework, executor, or agent; or
2) we do not need the additional data, such as the command run by the
task. These additional fields may be large and unnecessary for some
Mesos messages.
`Task` is generally constructed from a `TaskInfo`. See protobuf::createTask.
Protobuf type mesos.Task| Modifier and Type | Class and Description |
|---|---|
static class |
Protos.Task.Builder
Describes a task, similar to `TaskInfo`.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CONTAINER_FIELD_NUMBER |
static int |
DISCOVERY_FIELD_NUMBER |
static int |
EXECUTOR_ID_FIELD_NUMBER |
static int |
FRAMEWORK_ID_FIELD_NUMBER |
static int |
HEALTH_CHECK_FIELD_NUMBER |
static int |
KILL_POLICY_FIELD_NUMBER |
static int |
LABELS_FIELD_NUMBER |
static int |
LIMITS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static <any> |
PARSER
Deprecated.
|
static int |
RESOURCES_FIELD_NUMBER |
static int |
SLAVE_ID_FIELD_NUMBER |
static int |
STATE_FIELD_NUMBER |
static int |
STATUS_UPDATE_STATE_FIELD_NUMBER |
static int |
STATUS_UPDATE_UUID_FIELD_NUMBER |
static int |
STATUSES_FIELD_NUMBER |
static int |
TASK_ID_FIELD_NUMBER |
static int |
USER_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsLimits(java.lang.String key)
Resource limits associated with the task.
|
boolean |
equals(java.lang.Object obj) |
Protos.ContainerInfo |
getContainer()
Container information for the task.
|
Protos.ContainerInfoOrBuilder |
getContainerOrBuilder()
Container information for the task.
|
static Protos.Task |
getDefaultInstance() |
Protos.Task |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Protos.DiscoveryInfo |
getDiscovery()
Service discovery information for the task.
|
Protos.DiscoveryInfoOrBuilder |
getDiscoveryOrBuilder()
Service discovery information for the task.
|
Protos.ExecutorID |
getExecutorId()
optional .mesos.ExecutorID executor_id = 4; |
Protos.ExecutorIDOrBuilder |
getExecutorIdOrBuilder()
optional .mesos.ExecutorID executor_id = 4; |
Protos.FrameworkID |
getFrameworkId()
required .mesos.FrameworkID framework_id = 3; |
Protos.FrameworkIDOrBuilder |
getFrameworkIdOrBuilder()
required .mesos.FrameworkID framework_id = 3; |
Protos.HealthCheck |
getHealthCheck()
optional .mesos.HealthCheck health_check = 15; |
Protos.HealthCheckOrBuilder |
getHealthCheckOrBuilder()
optional .mesos.HealthCheck health_check = 15; |
Protos.KillPolicy |
getKillPolicy()
The kill policy used for this task when it is killed.
|
Protos.KillPolicyOrBuilder |
getKillPolicyOrBuilder()
The kill policy used for this task when it is killed.
|
Protos.Labels |
getLabels()
optional .mesos.Labels labels = 11; |
Protos.LabelsOrBuilder |
getLabelsOrBuilder()
optional .mesos.Labels labels = 11; |
java.util.Map<java.lang.String,Protos.Value.Scalar> |
getLimits()
Deprecated.
|
int |
getLimitsCount()
Resource limits associated with the task.
|
java.util.Map<java.lang.String,Protos.Value.Scalar> |
getLimitsMap()
Resource limits associated with the task.
|
Protos.Value.Scalar |
getLimitsOrDefault(java.lang.String key,
Protos.Value.Scalar defaultValue)
Resource limits associated with the task.
|
Protos.Value.Scalar |
getLimitsOrThrow(java.lang.String key)
Resource limits associated with the task.
|
java.lang.String |
getName()
required string name = 1; |
com.google.protobuf.ByteString |
getNameBytes()
required string name = 1; |
<any> |
getParserForType() |
Protos.Resource |
getResources(int index)
repeated .mesos.Resource resources = 7; |
int |
getResourcesCount()
repeated .mesos.Resource resources = 7; |
java.util.List<Protos.Resource> |
getResourcesList()
repeated .mesos.Resource resources = 7; |
Protos.ResourceOrBuilder |
getResourcesOrBuilder(int index)
repeated .mesos.Resource resources = 7; |
java.util.List<? extends Protos.ResourceOrBuilder> |
getResourcesOrBuilderList()
repeated .mesos.Resource resources = 7; |
int |
getSerializedSize() |
Protos.SlaveID |
getSlaveId()
required .mesos.SlaveID slave_id = 5; |
Protos.SlaveIDOrBuilder |
getSlaveIdOrBuilder()
required .mesos.SlaveID slave_id = 5; |
Protos.TaskState |
getState()
Latest state of the task.
|
Protos.TaskStatus |
getStatuses(int index)
repeated .mesos.TaskStatus statuses = 8; |
int |
getStatusesCount()
repeated .mesos.TaskStatus statuses = 8; |
java.util.List<Protos.TaskStatus> |
getStatusesList()
repeated .mesos.TaskStatus statuses = 8; |
Protos.TaskStatusOrBuilder |
getStatusesOrBuilder(int index)
repeated .mesos.TaskStatus statuses = 8; |
java.util.List<? extends Protos.TaskStatusOrBuilder> |
getStatusesOrBuilderList()
repeated .mesos.TaskStatus statuses = 8; |
Protos.TaskState |
getStatusUpdateState()
These fields correspond to the state and uuid of the latest
status update forwarded to the master.
|
com.google.protobuf.ByteString |
getStatusUpdateUuid()
optional bytes status_update_uuid = 10; |
Protos.TaskID |
getTaskId()
required .mesos.TaskID task_id = 2; |
Protos.TaskIDOrBuilder |
getTaskIdOrBuilder()
required .mesos.TaskID task_id = 2; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
java.lang.String |
getUser()
Specific user under which task is running.
|
com.google.protobuf.ByteString |
getUserBytes()
Specific user under which task is running.
|
boolean |
hasContainer()
Container information for the task.
|
boolean |
hasDiscovery()
Service discovery information for the task.
|
boolean |
hasExecutorId()
optional .mesos.ExecutorID executor_id = 4; |
boolean |
hasFrameworkId()
required .mesos.FrameworkID framework_id = 3; |
int |
hashCode() |
boolean |
hasHealthCheck()
optional .mesos.HealthCheck health_check = 15; |
boolean |
hasKillPolicy()
The kill policy used for this task when it is killed.
|
boolean |
hasLabels()
optional .mesos.Labels labels = 11; |
boolean |
hasName()
required string name = 1; |
boolean |
hasSlaveId()
required .mesos.SlaveID slave_id = 5; |
boolean |
hasState()
Latest state of the task.
|
boolean |
hasStatusUpdateState()
These fields correspond to the state and uuid of the latest
status update forwarded to the master.
|
boolean |
hasStatusUpdateUuid()
optional bytes status_update_uuid = 10; |
boolean |
hasTaskId()
required .mesos.TaskID task_id = 2; |
boolean |
hasUser()
Specific user under which task is running.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static Protos.Task.Builder |
newBuilder() |
static Protos.Task.Builder |
newBuilder(Protos.Task prototype) |
Protos.Task.Builder |
newBuilderForType() |
protected Protos.Task.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static Protos.Task |
parseDelimitedFrom(java.io.InputStream input) |
static Protos.Task |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Task |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Task |
parseFrom(java.nio.ByteBuffer data) |
static Protos.Task |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Task |
parseFrom(com.google.protobuf.ByteString data) |
static Protos.Task |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Task |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Protos.Task |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Task |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static <any> |
parser() |
Protos.Task.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
public static final int NAME_FIELD_NUMBER
public static final int TASK_ID_FIELD_NUMBER
public static final int FRAMEWORK_ID_FIELD_NUMBER
public static final int EXECUTOR_ID_FIELD_NUMBER
public static final int SLAVE_ID_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
public static final int RESOURCES_FIELD_NUMBER
public static final int STATUSES_FIELD_NUMBER
public static final int STATUS_UPDATE_STATE_FIELD_NUMBER
public static final int STATUS_UPDATE_UUID_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
public static final int DISCOVERY_FIELD_NUMBER
public static final int CONTAINER_FIELD_NUMBER
public static final int HEALTH_CHECK_FIELD_NUMBER
public static final int KILL_POLICY_FIELD_NUMBER
public static final int USER_FIELD_NUMBER
public static final int LIMITS_FIELD_NUMBER
@Deprecated public static final <any> PARSER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
public boolean hasName()
required string name = 1;hasName in interface Protos.TaskOrBuilderpublic java.lang.String getName()
required string name = 1;getName in interface Protos.TaskOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
required string name = 1;getNameBytes in interface Protos.TaskOrBuilderpublic boolean hasTaskId()
required .mesos.TaskID task_id = 2;hasTaskId in interface Protos.TaskOrBuilderpublic Protos.TaskID getTaskId()
required .mesos.TaskID task_id = 2;getTaskId in interface Protos.TaskOrBuilderpublic Protos.TaskIDOrBuilder getTaskIdOrBuilder()
required .mesos.TaskID task_id = 2;getTaskIdOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasFrameworkId()
required .mesos.FrameworkID framework_id = 3;hasFrameworkId in interface Protos.TaskOrBuilderpublic Protos.FrameworkID getFrameworkId()
required .mesos.FrameworkID framework_id = 3;getFrameworkId in interface Protos.TaskOrBuilderpublic Protos.FrameworkIDOrBuilder getFrameworkIdOrBuilder()
required .mesos.FrameworkID framework_id = 3;getFrameworkIdOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasExecutorId()
optional .mesos.ExecutorID executor_id = 4;hasExecutorId in interface Protos.TaskOrBuilderpublic Protos.ExecutorID getExecutorId()
optional .mesos.ExecutorID executor_id = 4;getExecutorId in interface Protos.TaskOrBuilderpublic Protos.ExecutorIDOrBuilder getExecutorIdOrBuilder()
optional .mesos.ExecutorID executor_id = 4;getExecutorIdOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasSlaveId()
required .mesos.SlaveID slave_id = 5;hasSlaveId in interface Protos.TaskOrBuilderpublic Protos.SlaveID getSlaveId()
required .mesos.SlaveID slave_id = 5;getSlaveId in interface Protos.TaskOrBuilderpublic Protos.SlaveIDOrBuilder getSlaveIdOrBuilder()
required .mesos.SlaveID slave_id = 5;getSlaveIdOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasState()
Latest state of the task.
required .mesos.TaskState state = 6;hasState in interface Protos.TaskOrBuilderpublic Protos.TaskState getState()
Latest state of the task.
required .mesos.TaskState state = 6;getState in interface Protos.TaskOrBuilderpublic java.util.List<Protos.Resource> getResourcesList()
repeated .mesos.Resource resources = 7;getResourcesList in interface Protos.TaskOrBuilderpublic java.util.List<? extends Protos.ResourceOrBuilder> getResourcesOrBuilderList()
repeated .mesos.Resource resources = 7;getResourcesOrBuilderList in interface Protos.TaskOrBuilderpublic int getResourcesCount()
repeated .mesos.Resource resources = 7;getResourcesCount in interface Protos.TaskOrBuilderpublic Protos.Resource getResources(int index)
repeated .mesos.Resource resources = 7;getResources in interface Protos.TaskOrBuilderpublic Protos.ResourceOrBuilder getResourcesOrBuilder(int index)
repeated .mesos.Resource resources = 7;getResourcesOrBuilder in interface Protos.TaskOrBuilderpublic java.util.List<Protos.TaskStatus> getStatusesList()
repeated .mesos.TaskStatus statuses = 8;getStatusesList in interface Protos.TaskOrBuilderpublic java.util.List<? extends Protos.TaskStatusOrBuilder> getStatusesOrBuilderList()
repeated .mesos.TaskStatus statuses = 8;getStatusesOrBuilderList in interface Protos.TaskOrBuilderpublic int getStatusesCount()
repeated .mesos.TaskStatus statuses = 8;getStatusesCount in interface Protos.TaskOrBuilderpublic Protos.TaskStatus getStatuses(int index)
repeated .mesos.TaskStatus statuses = 8;getStatuses in interface Protos.TaskOrBuilderpublic Protos.TaskStatusOrBuilder getStatusesOrBuilder(int index)
repeated .mesos.TaskStatus statuses = 8;getStatusesOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasStatusUpdateState()
These fields correspond to the state and uuid of the latest status update forwarded to the master. NOTE: Either both the fields must be set or both must be unset.
optional .mesos.TaskState status_update_state = 9;hasStatusUpdateState in interface Protos.TaskOrBuilderpublic Protos.TaskState getStatusUpdateState()
These fields correspond to the state and uuid of the latest status update forwarded to the master. NOTE: Either both the fields must be set or both must be unset.
optional .mesos.TaskState status_update_state = 9;getStatusUpdateState in interface Protos.TaskOrBuilderpublic boolean hasStatusUpdateUuid()
optional bytes status_update_uuid = 10;hasStatusUpdateUuid in interface Protos.TaskOrBuilderpublic com.google.protobuf.ByteString getStatusUpdateUuid()
optional bytes status_update_uuid = 10;getStatusUpdateUuid in interface Protos.TaskOrBuilderpublic boolean hasLabels()
optional .mesos.Labels labels = 11;hasLabels in interface Protos.TaskOrBuilderpublic Protos.Labels getLabels()
optional .mesos.Labels labels = 11;getLabels in interface Protos.TaskOrBuilderpublic Protos.LabelsOrBuilder getLabelsOrBuilder()
optional .mesos.Labels labels = 11;getLabelsOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasDiscovery()
Service discovery information for the task. It is not interpreted or acted upon by Mesos. It is up to a service discovery system to use this information as needed and to handle tasks without service discovery information.
optional .mesos.DiscoveryInfo discovery = 12;hasDiscovery in interface Protos.TaskOrBuilderpublic Protos.DiscoveryInfo getDiscovery()
Service discovery information for the task. It is not interpreted or acted upon by Mesos. It is up to a service discovery system to use this information as needed and to handle tasks without service discovery information.
optional .mesos.DiscoveryInfo discovery = 12;getDiscovery in interface Protos.TaskOrBuilderpublic Protos.DiscoveryInfoOrBuilder getDiscoveryOrBuilder()
Service discovery information for the task. It is not interpreted or acted upon by Mesos. It is up to a service discovery system to use this information as needed and to handle tasks without service discovery information.
optional .mesos.DiscoveryInfo discovery = 12;getDiscoveryOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasContainer()
Container information for the task.
optional .mesos.ContainerInfo container = 13;hasContainer in interface Protos.TaskOrBuilderpublic Protos.ContainerInfo getContainer()
Container information for the task.
optional .mesos.ContainerInfo container = 13;getContainer in interface Protos.TaskOrBuilderpublic Protos.ContainerInfoOrBuilder getContainerOrBuilder()
Container information for the task.
optional .mesos.ContainerInfo container = 13;getContainerOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasHealthCheck()
optional .mesos.HealthCheck health_check = 15;hasHealthCheck in interface Protos.TaskOrBuilderpublic Protos.HealthCheck getHealthCheck()
optional .mesos.HealthCheck health_check = 15;getHealthCheck in interface Protos.TaskOrBuilderpublic Protos.HealthCheckOrBuilder getHealthCheckOrBuilder()
optional .mesos.HealthCheck health_check = 15;getHealthCheckOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasKillPolicy()
The kill policy used for this task when it is killed. It's possible for this policy to be overridden by the scheduler when killing the task.
optional .mesos.KillPolicy kill_policy = 16;hasKillPolicy in interface Protos.TaskOrBuilderpublic Protos.KillPolicy getKillPolicy()
The kill policy used for this task when it is killed. It's possible for this policy to be overridden by the scheduler when killing the task.
optional .mesos.KillPolicy kill_policy = 16;getKillPolicy in interface Protos.TaskOrBuilderpublic Protos.KillPolicyOrBuilder getKillPolicyOrBuilder()
The kill policy used for this task when it is killed. It's possible for this policy to be overridden by the scheduler when killing the task.
optional .mesos.KillPolicy kill_policy = 16;getKillPolicyOrBuilder in interface Protos.TaskOrBuilderpublic boolean hasUser()
Specific user under which task is running.
optional string user = 14;hasUser in interface Protos.TaskOrBuilderpublic java.lang.String getUser()
Specific user under which task is running.
optional string user = 14;getUser in interface Protos.TaskOrBuilderpublic com.google.protobuf.ByteString getUserBytes()
Specific user under which task is running.
optional string user = 14;getUserBytes in interface Protos.TaskOrBuilderpublic int getLimitsCount()
Protos.TaskOrBuilderResource limits associated with the task.
map<string, .mesos.Value.Scalar> limits = 17;getLimitsCount in interface Protos.TaskOrBuilderpublic boolean containsLimits(java.lang.String key)
Resource limits associated with the task.
map<string, .mesos.Value.Scalar> limits = 17;containsLimits in interface Protos.TaskOrBuilder@Deprecated public java.util.Map<java.lang.String,Protos.Value.Scalar> getLimits()
getLimitsMap() instead.getLimits in interface Protos.TaskOrBuilderpublic java.util.Map<java.lang.String,Protos.Value.Scalar> getLimitsMap()
Resource limits associated with the task.
map<string, .mesos.Value.Scalar> limits = 17;getLimitsMap in interface Protos.TaskOrBuilderpublic Protos.Value.Scalar getLimitsOrDefault(java.lang.String key, Protos.Value.Scalar defaultValue)
Resource limits associated with the task.
map<string, .mesos.Value.Scalar> limits = 17;getLimitsOrDefault in interface Protos.TaskOrBuilderpublic Protos.Value.Scalar getLimitsOrThrow(java.lang.String key)
Resource limits associated with the task.
map<string, .mesos.Value.Scalar> limits = 17;getLimitsOrThrow in interface Protos.TaskOrBuilderpublic final boolean isInitialized()
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
java.io.IOExceptionpublic int getSerializedSize()
public boolean equals(java.lang.Object obj)
public int hashCode()
public static Protos.Task parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Task parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Task parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Task parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Task parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Task parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Protos.Task parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Protos.Task parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Protos.Task parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Protos.Task parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Protos.Task.Builder newBuilderForType()
public static Protos.Task.Builder newBuilder()
public static Protos.Task.Builder newBuilder(Protos.Task prototype)
public Protos.Task.Builder toBuilder()
protected Protos.Task.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
public static Protos.Task getDefaultInstance()
public static <any> parser()
public <any> getParserForType()
public Protos.Task getDefaultInstanceForType()