public class DefaultAllocateCountTracker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DefaultAllocateCountTracker.AllocateCountInfo |
Constructor and Description |
---|
DefaultAllocateCountTracker(org.apache.hadoop.conf.Configuration configuration)
Instantiates a new default allocate count tracker.
|
DefaultAllocateCountTracker(java.lang.String id,
org.apache.hadoop.conf.Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addContainers(ContainerAllocateData containerAllocateData)
Adds new count of containers into 'host', 'rack'
and 'any' pending requests.
|
void |
addContainers(int count)
Adds new count of containers into 'any'
pending requests.
|
DefaultAllocateCountTracker.AllocateCountInfo |
getAllocateCounts()
Gets the allocate counts which should be used
to create allocate requests.
|
java.lang.String |
getId() |
org.apache.hadoop.yarn.api.records.Container |
processAllocatedContainer(org.apache.hadoop.yarn.api.records.Container container) |
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration) |
java.lang.String |
toString() |
public DefaultAllocateCountTracker(org.apache.hadoop.conf.Configuration configuration)
configuration
- the hadoop configurationpublic DefaultAllocateCountTracker(java.lang.String id, org.apache.hadoop.conf.Configuration configuration)
public java.lang.String getId()
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
public void addContainers(int count)
count
- the count to addpublic void addContainers(ContainerAllocateData containerAllocateData)
containerAllocateData
- the container allocate datapublic DefaultAllocateCountTracker.AllocateCountInfo getAllocateCounts()
public org.apache.hadoop.yarn.api.records.Container processAllocatedContainer(org.apache.hadoop.yarn.api.records.Container container)
public java.lang.String toString()
toString
in class java.lang.Object