Class OpportunisticContainerAllocator.ContainerIdGenerator
java.lang.Object
org.apache.hadoop.yarn.server.scheduler.OpportunisticContainerAllocator.ContainerIdGenerator
- Enclosing class:
- OpportunisticContainerAllocator
A Container Id Generator.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGenerates a new long value.voidresetContainerIdCounter(long containerIdStart) This method can reset the generator to a specific value.
-
Field Details
-
containerIdCounter
-
-
Constructor Details
-
ContainerIdGenerator
public ContainerIdGenerator()
-
-
Method Details
-
resetContainerIdCounter
public void resetContainerIdCounter(long containerIdStart) This method can reset the generator to a specific value.- Parameters:
containerIdStart- containerId
-
generateContainerId
public long generateContainerId()Generates a new long value. Default implementation increments the underlying AtomicLong. Sub classes are encouraged to over-ride this behaviour.- Returns:
- Counter.
-