Class ResourceSpecification
- java.lang.Object
-
- org.apache.nemo.common.ir.executionproperty.ResourceSpecification
-
public final class ResourceSpecification extends java.lang.Object
Represents the specifications of a resource.
-
-
Constructor Summary
Constructors Constructor Description ResourceSpecification(java.lang.String containerType, int capacity, int memory)
ResourceSpecification(java.lang.String containerType, int capacity, int memory, java.util.OptionalDouble maxOffheapRatio, java.util.OptionalInt poisonSec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCapacity()
java.lang.String
getContainerType()
java.util.OptionalDouble
getMaxOffheapRatio()
int
getMemory()
java.util.OptionalInt
getPoisonSec()
java.lang.String
getResourceSpecId()
-
-
-
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)
-
-