|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class SchedulerNode
Represents a YARN Cluster Node from the viewpoint of the scheduler.
| Constructor Summary | |
|---|---|
SchedulerNode(RMNode node,
boolean usePortForNodeName)
|
|
| Method Summary | |
|---|---|
void |
allocateContainer(RMContainer rmContainer)
The Scheduler has allocated containers on this node to the given application. |
org.apache.hadoop.yarn.api.records.Resource |
getAvailableResource()
Get available resources on the node. |
String |
getHttpAddress()
|
org.apache.hadoop.yarn.api.records.NodeId |
getNodeID()
Get the ID of the node which contains both its hostname and port. |
String |
getNodeName()
Get the name of the node for scheduling matching decisions. |
int |
getNumContainers()
Get number of active containers on the node. |
String |
getRackName()
Get rackname. |
RMContainer |
getReservedContainer()
|
RMNode |
getRMNode()
|
List<RMContainer> |
getRunningContainers()
|
org.apache.hadoop.yarn.api.records.Resource |
getTotalResource()
Get total resources on the node. |
org.apache.hadoop.yarn.api.records.Resource |
getUsedResource()
Get used resources on the node. |
boolean |
isValidContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
|
void |
recoverContainer(RMContainer rmContainer)
|
void |
releaseContainer(org.apache.hadoop.yarn.api.records.Container container)
Release an allocated container on this node. |
abstract void |
reserveResource(SchedulerApplicationAttempt attempt,
org.apache.hadoop.yarn.api.records.Priority priority,
RMContainer container)
Reserve container for the attempt on this node. |
protected void |
setReservedContainer(RMContainer reservedContainer)
|
void |
setTotalResource(org.apache.hadoop.yarn.api.records.Resource resource)
Set total resources on the node. |
String |
toString()
|
abstract void |
unreserveResource(SchedulerApplicationAttempt attempt)
Unreserve resources on this node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SchedulerNode(RMNode node,
boolean usePortForNodeName)
| Method Detail |
|---|
public RMNode getRMNode()
public void setTotalResource(org.apache.hadoop.yarn.api.records.Resource resource)
resource - total resources on the node.public org.apache.hadoop.yarn.api.records.NodeId getNodeID()
public String getHttpAddress()
public String getNodeName()
YarnConfiguration.RM_SCHEDULER_INCLUDE_PORT_IN_NODE_NAME constant.
The main usecase of this is Yarn minicluster to be able to differentiate
node manager instances by their port number.
public String getRackName()
public void allocateContainer(RMContainer rmContainer)
rmContainer - allocated containerpublic org.apache.hadoop.yarn.api.records.Resource getAvailableResource()
public org.apache.hadoop.yarn.api.records.Resource getUsedResource()
public org.apache.hadoop.yarn.api.records.Resource getTotalResource()
public boolean isValidContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
public void releaseContainer(org.apache.hadoop.yarn.api.records.Container container)
container - container to be released
public abstract void reserveResource(SchedulerApplicationAttempt attempt,
org.apache.hadoop.yarn.api.records.Priority priority,
RMContainer container)
public abstract void unreserveResource(SchedulerApplicationAttempt attempt)
public String toString()
toString in class Objectpublic int getNumContainers()
public List<RMContainer> getRunningContainers()
public RMContainer getReservedContainer()
protected void setReservedContainer(RMContainer reservedContainer)
public void recoverContainer(RMContainer rmContainer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||