@InterfaceAudience.Private @InterfaceStability.Unstable public class FSSchedulerNode extends SchedulerNode
| Constructor and Description |
|---|
FSSchedulerNode(RMNode node,
boolean usePortForNodeName) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateContainer(ApplicationId applicationId,
RMContainer rmContainer)
The Scheduler has allocated containers on this node to the
given application.
|
Resource |
getAvailableResource()
Get available resources on the node.
|
String |
getHttpAddress() |
NodeId |
getNodeID() |
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.
|
AppSchedulable |
getReservedAppSchedulable() |
RMContainer |
getReservedContainer() |
RMNode |
getRMNode() |
List<RMContainer> |
getRunningContainers() |
Resource |
getTotalResource()
Get total resources on the node.
|
Resource |
getUsedResource()
Get used resources on the node.
|
void |
releaseContainer(Container container)
Release an allocated container on this node.
|
void |
reserveResource(FSSchedulerApp application,
Priority priority,
RMContainer reservedContainer) |
String |
toString() |
void |
unreserveResource(FSSchedulerApp application) |
public FSSchedulerNode(RMNode node, boolean usePortForNodeName)
public RMNode getRMNode()
public NodeId getNodeID()
public String getHttpAddress()
public String getNodeName()
SchedulerNodeYarnConfiguration.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.getNodeName in class SchedulerNodepublic String getRackName()
SchedulerNodegetRackName in class SchedulerNodepublic void allocateContainer(ApplicationId applicationId, RMContainer rmContainer)
applicationId - applicationrmContainer - allocated containerpublic Resource getAvailableResource()
SchedulerNodegetAvailableResource in class SchedulerNodepublic Resource getUsedResource()
SchedulerNodegetUsedResource in class SchedulerNodepublic void releaseContainer(Container container)
container - container to be releasedpublic Resource getTotalResource()
SchedulerNodegetTotalResource in class SchedulerNodepublic int getNumContainers()
SchedulerNodegetNumContainers in class SchedulerNodepublic List<RMContainer> getRunningContainers()
public void reserveResource(FSSchedulerApp application, Priority priority, RMContainer reservedContainer)
public void unreserveResource(FSSchedulerApp application)
public RMContainer getReservedContainer()
public AppSchedulable getReservedAppSchedulable()
Copyright © 2013 Apache Software Foundation. All rights reserved.