@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()
SchedulerNode
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.getNodeName
in class SchedulerNode
public String getRackName()
SchedulerNode
getRackName
in class SchedulerNode
public void allocateContainer(ApplicationId applicationId, RMContainer rmContainer)
applicationId
- applicationrmContainer
- allocated containerpublic Resource getAvailableResource()
SchedulerNode
getAvailableResource
in class SchedulerNode
public Resource getUsedResource()
SchedulerNode
getUsedResource
in class SchedulerNode
public void releaseContainer(Container container)
container
- container to be releasedpublic Resource getTotalResource()
SchedulerNode
getTotalResource
in class SchedulerNode
public int getNumContainers()
SchedulerNode
getNumContainers
in class SchedulerNode
public 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.