This project has retired. For details please refer to its Attic page.
Protos.Resource
JavaScript is disabled on your browser.
Skip navigation links
org.apache.mesos

Class Protos.Resource

  • All Implemented Interfaces:
    Protos.ResourceOrBuilder
    Enclosing class:
    Protos


    public static final class Protos.Resource
    extends com.google.protobuf.GeneratedMessageV3
    implements Protos.ResourceOrBuilder 
     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.
     
    Protobuf type mesos.Resource
    • Method Detail

      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      • hasProviderId

        public boolean hasProviderId()
         Specified if the resource comes from a particular resource provider.
         
        optional .mesos.ResourceProviderID provider_id = 12;
        Specified by:
        hasProviderId in interface Protos.ResourceOrBuilder
      • hasRole

        @Deprecated
        public boolean hasRole()
        Deprecated.
         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.
         NOTE: Frameworks must not set this field if `reservations` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate once `reservations` is no longer experimental.
         
        optional string role = 6 [default = "*", deprecated = true];
        Specified by:
        hasRole in interface Protos.ResourceOrBuilder
      • getRole

        @Deprecated
        public java.lang.String getRole()
        Deprecated.
         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.
         NOTE: Frameworks must not set this field if `reservations` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate once `reservations` is no longer experimental.
         
        optional string role = 6 [default = "*", deprecated = true];
        Specified by:
        getRole in interface Protos.ResourceOrBuilder
      • getRoleBytes

        @Deprecated
        public com.google.protobuf.ByteString getRoleBytes()
        Deprecated.
         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.
         NOTE: Frameworks must not set this field if `reservations` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate once `reservations` is no longer experimental.
         
        optional string role = 6 [default = "*", deprecated = true];
        Specified by:
        getRoleBytes in interface Protos.ResourceOrBuilder
      • hasReservation

        public boolean hasReservation()
         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.
         NOTE: Frameworks must not set this field if `reservations` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate once `reservations` is no longer experimental.
         
        optional .mesos.Resource.ReservationInfo reservation = 8;
        Specified by:
        hasReservation in interface Protos.ResourceOrBuilder
      • getReservation

        public Protos.Resource.ReservationInfo getReservation()
         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.
         NOTE: Frameworks must not set this field if `reservations` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate once `reservations` is no longer experimental.
         
        optional .mesos.Resource.ReservationInfo reservation = 8;
        Specified by:
        getReservation in interface Protos.ResourceOrBuilder
      • getReservationOrBuilder

        public Protos.Resource.ReservationInfoOrBuilder getReservationOrBuilder()
         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.
         NOTE: Frameworks must not set this field if `reservations` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate once `reservations` is no longer experimental.
         
        optional .mesos.Resource.ReservationInfo reservation = 8;
        Specified by:
        getReservationOrBuilder in interface Protos.ResourceOrBuilder
      • getReservationsList

        public java.util.List<Protos.Resource.ReservationInfo> getReservationsList()
         The stack of reservations. If this field is empty, it indicates that this
         resource is unreserved. Otherwise, the resource is reserved. The first
         `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must
         have `DYNAMIC`. One can create a new reservation on top of an existing
         one by pushing a new `ReservationInfo` to the back. The last
         `ReservationInfo` in this stack is the "current" reservation. The new
         reservation's role must be a child of the current reservation's role.
         NOTE: Frameworks must not set this field if `reservation` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate `role` and `reservation` once this is stable.
         
        repeated .mesos.Resource.ReservationInfo reservations = 13;
        Specified by:
        getReservationsList in interface Protos.ResourceOrBuilder
      • getReservationsOrBuilderList

        public java.util.List<? extends Protos.Resource.ReservationInfoOrBuilder> getReservationsOrBuilderList()
         The stack of reservations. If this field is empty, it indicates that this
         resource is unreserved. Otherwise, the resource is reserved. The first
         `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must
         have `DYNAMIC`. One can create a new reservation on top of an existing
         one by pushing a new `ReservationInfo` to the back. The last
         `ReservationInfo` in this stack is the "current" reservation. The new
         reservation's role must be a child of the current reservation's role.
         NOTE: Frameworks must not set this field if `reservation` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate `role` and `reservation` once this is stable.
         
        repeated .mesos.Resource.ReservationInfo reservations = 13;
        Specified by:
        getReservationsOrBuilderList in interface Protos.ResourceOrBuilder
      • getReservationsCount

        public int getReservationsCount()
         The stack of reservations. If this field is empty, it indicates that this
         resource is unreserved. Otherwise, the resource is reserved. The first
         `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must
         have `DYNAMIC`. One can create a new reservation on top of an existing
         one by pushing a new `ReservationInfo` to the back. The last
         `ReservationInfo` in this stack is the "current" reservation. The new
         reservation's role must be a child of the current reservation's role.
         NOTE: Frameworks must not set this field if `reservation` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate `role` and `reservation` once this is stable.
         
        repeated .mesos.Resource.ReservationInfo reservations = 13;
        Specified by:
        getReservationsCount in interface Protos.ResourceOrBuilder
      • getReservations

        public Protos.Resource.ReservationInfo getReservations(int index)
         The stack of reservations. If this field is empty, it indicates that this
         resource is unreserved. Otherwise, the resource is reserved. The first
         `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must
         have `DYNAMIC`. One can create a new reservation on top of an existing
         one by pushing a new `ReservationInfo` to the back. The last
         `ReservationInfo` in this stack is the "current" reservation. The new
         reservation's role must be a child of the current reservation's role.
         NOTE: Frameworks must not set this field if `reservation` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate `role` and `reservation` once this is stable.
         
        repeated .mesos.Resource.ReservationInfo reservations = 13;
        Specified by:
        getReservations in interface Protos.ResourceOrBuilder
      • getReservationsOrBuilder

        public Protos.Resource.ReservationInfoOrBuilder getReservationsOrBuilder(int index)
         The stack of reservations. If this field is empty, it indicates that this
         resource is unreserved. Otherwise, the resource is reserved. The first
         `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must
         have `DYNAMIC`. One can create a new reservation on top of an existing
         one by pushing a new `ReservationInfo` to the back. The last
         `ReservationInfo` in this stack is the "current" reservation. The new
         reservation's role must be a child of the current reservation's role.
         NOTE: Frameworks must not set this field if `reservation` is set.
         See the 'Resource Format' section for more details.
         TODO(mpark): Deprecate `role` and `reservation` once this is stable.
         
        repeated .mesos.Resource.ReservationInfo reservations = 13;
        Specified by:
        getReservationsOrBuilder in interface Protos.ResourceOrBuilder
      • hasRevocable

        public boolean hasRevocable()
         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.
         
        optional .mesos.Resource.RevocableInfo revocable = 9;
        Specified by:
        hasRevocable in interface Protos.ResourceOrBuilder
      • getRevocable

        public Protos.Resource.RevocableInfo getRevocable()
         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.
         
        optional .mesos.Resource.RevocableInfo revocable = 9;
        Specified by:
        getRevocable in interface Protos.ResourceOrBuilder
      • getRevocableOrBuilder

        public Protos.Resource.RevocableInfoOrBuilder getRevocableOrBuilder()
         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.
         
        optional .mesos.Resource.RevocableInfo revocable = 9;
        Specified by:
        getRevocableOrBuilder in interface Protos.ResourceOrBuilder
      • hasShared

        public boolean hasShared()
         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.
         NOTE: Different shared resources must be uniquely identifiable.
         This currently holds as persistent volume should have unique `id`
         (this is not validated for enforced though).
         
        optional .mesos.Resource.SharedInfo shared = 10;
        Specified by:
        hasShared in interface Protos.ResourceOrBuilder
      • getShared

        public Protos.Resource.SharedInfo getShared()
         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.
         NOTE: Different shared resources must be uniquely identifiable.
         This currently holds as persistent volume should have unique `id`
         (this is not validated for enforced though).
         
        optional .mesos.Resource.SharedInfo shared = 10;
        Specified by:
        getShared in interface Protos.ResourceOrBuilder
      • getSharedOrBuilder

        public Protos.Resource.SharedInfoOrBuilder getSharedOrBuilder()
         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.
         NOTE: Different shared resources must be uniquely identifiable.
         This currently holds as persistent volume should have unique `id`
         (this is not validated for enforced though).
         
        optional .mesos.Resource.SharedInfo shared = 10;
        Specified by:
        getSharedOrBuilder in interface Protos.ResourceOrBuilder
      • isInitialized

        public final boolean isInitialized()
      • writeTo

        public void writeTo(com.google.protobuf.CodedOutputStream output)
         throws java.io.IOException
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
      • equals

        public boolean equals(java.lang.Object obj)
      • hashCode

        public int hashCode()
      • parseFrom

        public static Protos.Resource parseFrom(java.nio.ByteBuffer data)
         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Protos.Resource parseFrom(java.nio.ByteBuffer data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Protos.Resource parseFrom(com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Protos.Resource parseFrom(com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Protos.Resource parseFrom(byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Protos.Resource parseFrom(java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Protos.Resource parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static Protos.Resource parseDelimitedFrom(java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Protos.Resource parseFrom(com.google.protobuf.CodedInputStream input)
         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static Protos.Resource parseFrom(com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        protected Protos.Resource.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      • parser

        public static <any> parser()
      • getParserForType

        public <any> getParserForType()
      • getDefaultInstanceForType

        public Protos.Resource getDefaultInstanceForType()
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /