public class FiCaSchedulerNode extends SchedulerNode
Constructor and Description |
---|
FiCaSchedulerNode(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.
|
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(SchedulerApplication application,
Priority priority,
RMContainer reservedContainer) |
String |
toString() |
void |
unreserveResource(SchedulerApplication application) |
public FiCaSchedulerNode(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 Resource getTotalResource()
SchedulerNode
getTotalResource
in class SchedulerNode
public void releaseContainer(Container container)
container
- container to be releasedpublic int getNumContainers()
SchedulerNode
getNumContainers
in class SchedulerNode
public List<RMContainer> getRunningContainers()
public void reserveResource(SchedulerApplication application, Priority priority, RMContainer reservedContainer)
public void unreserveResource(SchedulerApplication application)
public RMContainer getReservedContainer()
Copyright © 2013 Apache Software Foundation. All rights reserved.