Spring for Apache Hadoop

org.springframework.yarn.am.allocate
Class ContainerAllocateData

java.lang.Object
  extended by org.springframework.yarn.am.allocate.ContainerAllocateData

public class ContainerAllocateData
extends java.lang.Object

Acts as a main entry point abstracting access for ResourceRequests.

Author:
Janne Valkealahti

Constructor Summary
ContainerAllocateData()
          Instantiates a new container allocate data.
 
Method Summary
 void addAny(int count)
          Adds request for any container for given count.
 void addHosts(java.lang.String name, int count)
          Adds request for a host for given count.
 void addRacks(java.lang.String name, int count)
          Adds request for a rack for given count.
 int getAny()
          Gets the count for any container.
 java.util.Map<java.lang.String,java.lang.Integer> getHosts()
          Gets the hosts counts.
 java.util.Map<java.lang.String,java.lang.Integer> getRacks()
          Gets the racks counts.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerAllocateData

public ContainerAllocateData()
Instantiates a new container allocate data.

Method Detail

addRacks

public void addRacks(java.lang.String name,
                     int count)
Adds request for a rack for given count.

Parameters:
name - the rack name
count - the container count

getRacks

public java.util.Map<java.lang.String,java.lang.Integer> getRacks()
Gets the racks counts.

Returns:
the racks count map

addHosts

public void addHosts(java.lang.String name,
                     int count)
Adds request for a host for given count.

Parameters:
name - the host name
count - the container count

getHosts

public java.util.Map<java.lang.String,java.lang.Integer> getHosts()
Gets the hosts counts.

Returns:
the hosts count map

addAny

public void addAny(int count)
Adds request for any container for given count.

Parameters:
count - the count

getAny

public int getAny()
Gets the count for any container.

Returns:
the any

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring for Apache Hadoop