Example usage for org.apache.hadoop.yarn.api.records NodeState LOST

List of usage examples for org.apache.hadoop.yarn.api.records NodeState LOST

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.records NodeState LOST.

Prototype

NodeState LOST

To view the source code for org.apache.hadoop.yarn.api.records NodeState LOST.

Click Source Link

Document

Node has not sent a heartbeat for some configured time threshold

Usage

From source file:io.hops.util.RmStreamingProcessor.java

License:Apache License

private void updateRMContext(RMNode rmNode) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("HOP :: PendingEventRetrieval rmNode " + rmNode + ", state: " + rmNode.getState());
    }//from w  w  w  .j  ava  2 s .  c o  m

    if (rmNode.getState() == NodeState.DECOMMISSIONED || rmNode.getState() == NodeState.REBOOTED
            || rmNode.getState() == NodeState.LOST) {

        rmContext.getInactiveRMNodes().put(rmNode.getNodeID(), rmNode);
        rmContext.getRMNodes().remove(rmNode.getNodeID(), rmNode);
    } else {
        rmContext.getInactiveRMNodes().remove(rmNode.getNodeID().getHost(), rmNode);
        rmContext.getRMNodes().put(rmNode.getNodeID(), rmNode);
    }
}