/** * Get rackname. * @return rackname */ public String getRackName() { return this.rmNode.getRackName(); }
/** * Get HTTP address for the node. * @return HTTP address for the node. */ public String getHttpAddress() { return this.rmNode.getHttpAddress(); }
@Override public void transition(RMNodeImpl rmNode, RMNodeEvent event) { RMNodeImpl.deactivateNode(rmNode, finalState); } }
private RMNodeImpl getRebootedNode() { NodeId nodeId = BuilderUtils.newNodeId("localhost", 0); Resource capability = Resource.newInstance(4096, 4); RMNodeImpl node = new RMNodeImpl(nodeId, rmContext,null, 0, 0, null, capability, null); node.handle(new RMNodeStartedEvent(node.getNodeID(), null, null)); Assert.assertEquals(NodeState.RUNNING, node.getState()); node.handle(new RMNodeEvent(node.getNodeID(), RMNodeEventType.REBOOTING)); Assert.assertEquals(NodeState.REBOOTED, node.getState()); return node; }
private void sendStartedEvent(RMNode node) { ((RMNodeImpl) node) .handle(new RMNodeStartedEvent(node.getNodeID(), null, null)); }
private void sendLostEvent(RMNode node) { ((RMNodeImpl) node) .handle(new RMNodeEvent(node.getNodeID(), RMNodeEventType.EXPIRE)); }
private static NodeHealthStatus updateRMNodeFromStatusEvents( RMNodeImpl rmNode, RMNodeStatusEvent statusEvent) { // Switch the last heartbeatresponse. NodeHealthStatus remoteNodeHealthStatus = statusEvent.getNodeHealthStatus(); rmNode.setHealthReport(remoteNodeHealthStatus.getHealthReport()); rmNode.setLastHealthReportTime(remoteNodeHealthStatus .getLastHealthReportTime()); rmNode.setAggregatedContainersUtilization(statusEvent .getAggregatedContainersUtilization()); rmNode.setNodeUtilization(statusEvent.getNodeUtilization()); return remoteNodeHealthStatus; }
/** * Get the ID of the node which contains both its hostname and port. * @return The ID of the node. */ public NodeId getNodeID() { return this.rmNode.getNodeID(); }
@Override public Resource getTotalCapability() { return node.getTotalCapability(); }
public RMNodeWrapper(RMNode node) { this.node = node; updates = node.pullContainerUpdates(); }
@Override public String getNodeManagerVersion() { return node.getNodeManagerVersion(); }
@Override public void updateNodeHeartbeatResponseForCleanup( NodeHeartbeatResponse nodeHeartbeatResponse) { node.updateNodeHeartbeatResponseForCleanup(nodeHeartbeatResponse); }
@Override public List<ApplicationId> getAppsToCleanup() { return node.getAppsToCleanup(); }
@Override public NodeId getNodeID() { return node.getNodeID(); }
/** * Get rackname. * * @return rackname */ public String getRackName() { return this.rmNode.getRackName(); }
@Override public String getHttpAddress() { return node.getHttpAddress(); }
/** * Get the ID of the node which contains both its hostname and port. * * @return the ID of the node */ public NodeId getNodeID() { return this.rmNode.getNodeID(); }
@Override public String getRackName() { return node.getRackName(); }
/** * Get the ID of the node which contains both its hostname and port. * * @return the ID of the node */ public NodeId getNodeID() { return this.rmNode.getNodeID(); }
/** * Get rackname. * * @return rackname */ public String getRackName() { return this.rmNode.getRackName(); }