/** * Handle node update from the RM. This syncs up the node map with the RM's view * @param updatedNodes updated nodes */ public synchronized NodeUpdatedOutcome onNodesUpdated(List<NodeReport> updatedNodes) { boolean changed = roleHistory.onNodesUpdated(updatedNodes); if (changed) { log.info("YARN cluster changed —cancelling current AA requests"); List<AbstractRMOperation> operations = cancelOutstandingAARequests(); log.debug("Created {} cancel requests", operations.size()); return new NodeUpdatedOutcome(true, operations); } return new NodeUpdatedOutcome(false, new ArrayList<AbstractRMOperation>(0)); }
/** * Handle node update from the RM. This syncs up the node map with the RM's view * @param updatedNodes updated nodes */ public synchronized NodeUpdatedOutcome onNodesUpdated(List<NodeReport> updatedNodes) { boolean changed = roleHistory.onNodesUpdated(updatedNodes); if (changed) { log.info("YARN cluster changed —cancelling current AA requests"); List<AbstractRMOperation> operations = cancelOutstandingAARequests(); log.debug("Created {} cancel requests", operations.size()); return new NodeUpdatedOutcome(true, operations); } return new NodeUpdatedOutcome(false, new ArrayList<AbstractRMOperation>(0)); }