public static final class Protos.Resource extends com.google.protobuf.GeneratedMessage implements Protos.ResourceOrBuilder
mesos.v1.Resource
Describes a resource from a resource provider. The `name` field is a string like "cpus" or "mem" that indicates which kind of resource this is; the rest of the fields describe the properties of the resource. A resource can take on one of three types: scalar (double), a list of finite and discrete ranges (e.g., [1-10, 20-30]), or a set of items. A resource is described using the standard protocol buffer "union" trick. Note that "disk" and "mem" resources are scalar values expressed in megabytes. Fractional "cpus" values are allowed (e.g., "0.5"), which correspond to partial shares of a CPU.
Modifier and Type | Class and Description |
---|---|
static class |
Protos.Resource.AllocationInfo
Protobuf type
mesos.v1.Resource.AllocationInfo |
static interface |
Protos.Resource.AllocationInfoOrBuilder |
static class |
Protos.Resource.Builder
Protobuf type
mesos.v1.Resource |
static class |
Protos.Resource.DiskInfo
Protobuf type
mesos.v1.Resource.DiskInfo |
static interface |
Protos.Resource.DiskInfoOrBuilder |
static class |
Protos.Resource.ReservationInfo
Protobuf type
mesos.v1.Resource.ReservationInfo |
static interface |
Protos.Resource.ReservationInfoOrBuilder |
static class |
Protos.Resource.RevocableInfo
Protobuf type
mesos.v1.Resource.RevocableInfo |
static interface |
Protos.Resource.RevocableInfoOrBuilder |
static class |
Protos.Resource.SharedInfo
Protobuf type
mesos.v1.Resource.SharedInfo |
static interface |
Protos.Resource.SharedInfoOrBuilder |
com.google.protobuf.GeneratedMessage.BuilderParent, com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessage.ExtendableBuilder>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingType extends com.google.protobuf.Message,Type>
Modifier and Type | Field and Description |
---|---|
static int |
ALLOCATION_INFO_FIELD_NUMBER |
static int |
DISK_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static com.google.protobuf.Parser<Protos.Resource> |
PARSER |
static int |
PROVIDER_ID_FIELD_NUMBER |
static int |
RANGES_FIELD_NUMBER |
static int |
RESERVATION_FIELD_NUMBER |
static int |
REVOCABLE_FIELD_NUMBER |
static int |
ROLE_FIELD_NUMBER |
static int |
SCALAR_FIELD_NUMBER |
static int |
SET_FIELD_NUMBER |
static int |
SHARED_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
Protos.Resource.AllocationInfo |
getAllocationInfo()
optional .mesos.v1.Resource.AllocationInfo allocation_info = 11; |
Protos.Resource.AllocationInfoOrBuilder |
getAllocationInfoOrBuilder()
optional .mesos.v1.Resource.AllocationInfo allocation_info = 11; |
static Protos.Resource |
getDefaultInstance() |
Protos.Resource |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Protos.Resource.DiskInfo |
getDisk()
optional .mesos.v1.Resource.DiskInfo disk = 7; |
Protos.Resource.DiskInfoOrBuilder |
getDiskOrBuilder()
optional .mesos.v1.Resource.DiskInfo disk = 7; |
String |
getName()
required string name = 1; |
com.google.protobuf.ByteString |
getNameBytes()
required string name = 1; |
com.google.protobuf.Parser<Protos.Resource> |
getParserForType() |
Protos.ResourceProviderID |
getProviderId()
optional .mesos.v1.ResourceProviderID provider_id = 12; |
Protos.ResourceProviderIDOrBuilder |
getProviderIdOrBuilder()
optional .mesos.v1.ResourceProviderID provider_id = 12; |
Protos.Value.Ranges |
getRanges()
optional .mesos.v1.Value.Ranges ranges = 4; |
Protos.Value.RangesOrBuilder |
getRangesOrBuilder()
optional .mesos.v1.Value.Ranges ranges = 4; |
Protos.Resource.ReservationInfo |
getReservation()
optional .mesos.v1.Resource.ReservationInfo reservation = 8; |
Protos.Resource.ReservationInfoOrBuilder |
getReservationOrBuilder()
optional .mesos.v1.Resource.ReservationInfo reservation = 8; |
Protos.Resource.RevocableInfo |
getRevocable()
optional .mesos.v1.Resource.RevocableInfo revocable = 9; |
Protos.Resource.RevocableInfoOrBuilder |
getRevocableOrBuilder()
optional .mesos.v1.Resource.RevocableInfo revocable = 9; |
String |
getRole()
optional string role = 6 [default = "*"]; |
com.google.protobuf.ByteString |
getRoleBytes()
optional string role = 6 [default = "*"]; |
Protos.Value.Scalar |
getScalar()
optional .mesos.v1.Value.Scalar scalar = 3; |
Protos.Value.ScalarOrBuilder |
getScalarOrBuilder()
optional .mesos.v1.Value.Scalar scalar = 3; |
int |
getSerializedSize() |
Protos.Value.Set |
getSet()
optional .mesos.v1.Value.Set set = 5; |
Protos.Value.SetOrBuilder |
getSetOrBuilder()
optional .mesos.v1.Value.Set set = 5; |
Protos.Resource.SharedInfo |
getShared()
optional .mesos.v1.Resource.SharedInfo shared = 10; |
Protos.Resource.SharedInfoOrBuilder |
getSharedOrBuilder()
optional .mesos.v1.Resource.SharedInfo shared = 10; |
Protos.Value.Type |
getType()
required .mesos.v1.Value.Type type = 2; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasAllocationInfo()
optional .mesos.v1.Resource.AllocationInfo allocation_info = 11; |
boolean |
hasDisk()
optional .mesos.v1.Resource.DiskInfo disk = 7; |
boolean |
hasName()
required string name = 1; |
boolean |
hasProviderId()
optional .mesos.v1.ResourceProviderID provider_id = 12; |
boolean |
hasRanges()
optional .mesos.v1.Value.Ranges ranges = 4; |
boolean |
hasReservation()
optional .mesos.v1.Resource.ReservationInfo reservation = 8; |
boolean |
hasRevocable()
optional .mesos.v1.Resource.RevocableInfo revocable = 9; |
boolean |
hasRole()
optional string role = 6 [default = "*"]; |
boolean |
hasScalar()
optional .mesos.v1.Value.Scalar scalar = 3; |
boolean |
hasSet()
optional .mesos.v1.Value.Set set = 5; |
boolean |
hasShared()
optional .mesos.v1.Resource.SharedInfo shared = 10; |
boolean |
hasType()
required .mesos.v1.Value.Type type = 2; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Protos.Resource.Builder |
newBuilder() |
static Protos.Resource.Builder |
newBuilder(Protos.Resource prototype) |
Protos.Resource.Builder |
newBuilderForType() |
protected Protos.Resource.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) |
static Protos.Resource |
parseDelimitedFrom(InputStream input) |
static Protos.Resource |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Resource |
parseFrom(byte[] data) |
static Protos.Resource |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Resource |
parseFrom(com.google.protobuf.ByteString data) |
static Protos.Resource |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Resource |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Protos.Resource |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Resource |
parseFrom(InputStream input) |
static Protos.Resource |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Protos.Resource.Builder |
toBuilder() |
protected Object |
writeReplace() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField
equals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toString
checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static com.google.protobuf.Parser<Protos.Resource> PARSER
public static final int PROVIDER_ID_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
public static final int SCALAR_FIELD_NUMBER
public static final int RANGES_FIELD_NUMBER
public static final int SET_FIELD_NUMBER
public static final int ROLE_FIELD_NUMBER
public static final int ALLOCATION_INFO_FIELD_NUMBER
public static final int RESERVATION_FIELD_NUMBER
public static final int DISK_FIELD_NUMBER
public static final int REVOCABLE_FIELD_NUMBER
public static final int SHARED_FIELD_NUMBER
public static Protos.Resource getDefaultInstance()
public Protos.Resource getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessage
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public com.google.protobuf.Parser<Protos.Resource> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public boolean hasProviderId()
optional .mesos.v1.ResourceProviderID provider_id = 12;
hasProviderId
in interface Protos.ResourceOrBuilder
public Protos.ResourceProviderID getProviderId()
optional .mesos.v1.ResourceProviderID provider_id = 12;
getProviderId
in interface Protos.ResourceOrBuilder
public Protos.ResourceProviderIDOrBuilder getProviderIdOrBuilder()
optional .mesos.v1.ResourceProviderID provider_id = 12;
getProviderIdOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasName()
required string name = 1;
hasName
in interface Protos.ResourceOrBuilder
public String getName()
required string name = 1;
getName
in interface Protos.ResourceOrBuilder
public com.google.protobuf.ByteString getNameBytes()
required string name = 1;
getNameBytes
in interface Protos.ResourceOrBuilder
public boolean hasType()
required .mesos.v1.Value.Type type = 2;
hasType
in interface Protos.ResourceOrBuilder
public Protos.Value.Type getType()
required .mesos.v1.Value.Type type = 2;
getType
in interface Protos.ResourceOrBuilder
public boolean hasScalar()
optional .mesos.v1.Value.Scalar scalar = 3;
hasScalar
in interface Protos.ResourceOrBuilder
public Protos.Value.Scalar getScalar()
optional .mesos.v1.Value.Scalar scalar = 3;
getScalar
in interface Protos.ResourceOrBuilder
public Protos.Value.ScalarOrBuilder getScalarOrBuilder()
optional .mesos.v1.Value.Scalar scalar = 3;
getScalarOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasRanges()
optional .mesos.v1.Value.Ranges ranges = 4;
hasRanges
in interface Protos.ResourceOrBuilder
public Protos.Value.Ranges getRanges()
optional .mesos.v1.Value.Ranges ranges = 4;
getRanges
in interface Protos.ResourceOrBuilder
public Protos.Value.RangesOrBuilder getRangesOrBuilder()
optional .mesos.v1.Value.Ranges ranges = 4;
getRangesOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasSet()
optional .mesos.v1.Value.Set set = 5;
hasSet
in interface Protos.ResourceOrBuilder
public Protos.Value.Set getSet()
optional .mesos.v1.Value.Set set = 5;
getSet
in interface Protos.ResourceOrBuilder
public Protos.Value.SetOrBuilder getSetOrBuilder()
optional .mesos.v1.Value.Set set = 5;
getSetOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasRole()
optional string role = 6 [default = "*"];
The role that this resource is reserved for. If "*", this indicates that the resource is unreserved. Otherwise, the resource will only be offered to frameworks that belong to this role.
hasRole
in interface Protos.ResourceOrBuilder
public String getRole()
optional string role = 6 [default = "*"];
The role that this resource is reserved for. If "*", this indicates that the resource is unreserved. Otherwise, the resource will only be offered to frameworks that belong to this role.
getRole
in interface Protos.ResourceOrBuilder
public com.google.protobuf.ByteString getRoleBytes()
optional string role = 6 [default = "*"];
The role that this resource is reserved for. If "*", this indicates that the resource is unreserved. Otherwise, the resource will only be offered to frameworks that belong to this role.
getRoleBytes
in interface Protos.ResourceOrBuilder
public boolean hasAllocationInfo()
optional .mesos.v1.Resource.AllocationInfo allocation_info = 11;
hasAllocationInfo
in interface Protos.ResourceOrBuilder
public Protos.Resource.AllocationInfo getAllocationInfo()
optional .mesos.v1.Resource.AllocationInfo allocation_info = 11;
getAllocationInfo
in interface Protos.ResourceOrBuilder
public Protos.Resource.AllocationInfoOrBuilder getAllocationInfoOrBuilder()
optional .mesos.v1.Resource.AllocationInfo allocation_info = 11;
getAllocationInfoOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasReservation()
optional .mesos.v1.Resource.ReservationInfo reservation = 8;
If this is set, this resource was dynamically reserved by an operator or a framework. Otherwise, this resource is either unreserved or statically reserved by an operator via the --resources flag.
hasReservation
in interface Protos.ResourceOrBuilder
public Protos.Resource.ReservationInfo getReservation()
optional .mesos.v1.Resource.ReservationInfo reservation = 8;
If this is set, this resource was dynamically reserved by an operator or a framework. Otherwise, this resource is either unreserved or statically reserved by an operator via the --resources flag.
getReservation
in interface Protos.ResourceOrBuilder
public Protos.Resource.ReservationInfoOrBuilder getReservationOrBuilder()
optional .mesos.v1.Resource.ReservationInfo reservation = 8;
If this is set, this resource was dynamically reserved by an operator or a framework. Otherwise, this resource is either unreserved or statically reserved by an operator via the --resources flag.
getReservationOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasDisk()
optional .mesos.v1.Resource.DiskInfo disk = 7;
hasDisk
in interface Protos.ResourceOrBuilder
public Protos.Resource.DiskInfo getDisk()
optional .mesos.v1.Resource.DiskInfo disk = 7;
getDisk
in interface Protos.ResourceOrBuilder
public Protos.Resource.DiskInfoOrBuilder getDiskOrBuilder()
optional .mesos.v1.Resource.DiskInfo disk = 7;
getDiskOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasRevocable()
optional .mesos.v1.Resource.RevocableInfo revocable = 9;
If this is set, the resources are revocable, i.e., any tasks or executors launched using these resources could get preempted or throttled at any time. This could be used by frameworks to run best effort tasks that do not need strict uptime or performance guarantees. Note that if this is set, 'disk' or 'reservation' cannot be set.
hasRevocable
in interface Protos.ResourceOrBuilder
public Protos.Resource.RevocableInfo getRevocable()
optional .mesos.v1.Resource.RevocableInfo revocable = 9;
If this is set, the resources are revocable, i.e., any tasks or executors launched using these resources could get preempted or throttled at any time. This could be used by frameworks to run best effort tasks that do not need strict uptime or performance guarantees. Note that if this is set, 'disk' or 'reservation' cannot be set.
getRevocable
in interface Protos.ResourceOrBuilder
public Protos.Resource.RevocableInfoOrBuilder getRevocableOrBuilder()
optional .mesos.v1.Resource.RevocableInfo revocable = 9;
If this is set, the resources are revocable, i.e., any tasks or executors launched using these resources could get preempted or throttled at any time. This could be used by frameworks to run best effort tasks that do not need strict uptime or performance guarantees. Note that if this is set, 'disk' or 'reservation' cannot be set.
getRevocableOrBuilder
in interface Protos.ResourceOrBuilder
public boolean hasShared()
optional .mesos.v1.Resource.SharedInfo shared = 10;
If this is set, the resources are shared, i.e. multiple tasks can be launched using this resource and all of them shall refer to the same physical resource on the cluster. Note that only persistent volumes can be shared currently.
hasShared
in interface Protos.ResourceOrBuilder
public Protos.Resource.SharedInfo getShared()
optional .mesos.v1.Resource.SharedInfo shared = 10;
If this is set, the resources are shared, i.e. multiple tasks can be launched using this resource and all of them shall refer to the same physical resource on the cluster. Note that only persistent volumes can be shared currently.
getShared
in interface Protos.ResourceOrBuilder
public Protos.Resource.SharedInfoOrBuilder getSharedOrBuilder()
optional .mesos.v1.Resource.SharedInfo shared = 10;
If this is set, the resources are shared, i.e. multiple tasks can be launched using this resource and all of them shall refer to the same physical resource on the cluster. Note that only persistent volumes can be shared currently.
getSharedOrBuilder
in interface Protos.ResourceOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.AbstractMessage
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.AbstractMessage
protected Object writeReplace() throws ObjectStreamException
writeReplace
in class com.google.protobuf.GeneratedMessage
ObjectStreamException
public static Protos.Resource parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Resource parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Resource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Resource parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Resource parseFrom(InputStream input) throws IOException
IOException
public static Protos.Resource parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Protos.Resource parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Protos.Resource parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Protos.Resource parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static Protos.Resource parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Protos.Resource.Builder newBuilder()
public Protos.Resource.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static Protos.Resource.Builder newBuilder(Protos.Resource prototype)
public Protos.Resource.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected Protos.Resource.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessage
Copyright © 2017 The Apache Software Foundation. All Rights Reserved.