Class ResourceSpecification


  • public final class ResourceSpecification
    extends java.lang.Object
    Represents the specifications of a resource.
    • Constructor Detail

      • ResourceSpecification

        public ResourceSpecification​(java.lang.String containerType,
                                     int capacity,
                                     int memory)
      • ResourceSpecification

        public ResourceSpecification​(java.lang.String containerType,
                                     int capacity,
                                     int memory,
                                     java.util.OptionalDouble maxOffheapRatio,
                                     java.util.OptionalInt poisonSec)
    • Method Detail

      • getContainerType

        public java.lang.String getContainerType()
        Returns:
        The type of the container.
      • getCapacity

        public int getCapacity()
        Returns:
        The number of Tasks that can be run in this container.
      • getMemory

        public int getMemory()
        Returns:
        Allocated memory for the container, in megabytes.
      • getMaxOffheapRatio

        public java.util.OptionalDouble getMaxOffheapRatio()
      • getResourceSpecId

        public java.lang.String getResourceSpecId()
      • getPoisonSec

        public java.util.OptionalInt getPoisonSec()
        Returns:
        -1 if this resource is not poisoned. (for all other normal cases) >= 0 the expected time to failure by poison. (for fault-handling tests)