Package org.apache.hadoop.yarn.api.records

Examples of org.apache.hadoop.yarn.api.records.ResourceOption


    // do resource update on each node.
    // Notice: it is still possible to have invalid NodeIDs as nodes decommission
    // may happen just at the same time. This time, only log and skip absent
    // nodes without throwing any exceptions.
    for (Map.Entry<NodeId, ResourceOption> entry : nodeResourceMap.entrySet()) {
      ResourceOption newResourceOption = entry.getValue();
      NodeId nodeId = entry.getKey();
      RMNode node = this.rmContext.getRMNodes().get(nodeId);
      if (node == null) {
        LOG.warn("Resource update get failed on an unrecognized node: " + nodeId);
      } else {
        node.setResourceOption(newResourceOption);
        LOG.info("Update resource successfully on node(" + node.getNodeID()
            +") with resource(" + newResourceOption.toString() + ")");
      }
    }
    UpdateNodeResourceResponse response = recordFactory.newRecordInstance(
          UpdateNodeResourceResponse.class);
      return response;
View Full Code Here


    // do resource update on each node.
    // Notice: it is still possible to have invalid NodeIDs as nodes decommission
    // may happen just at the same time. This time, only log and skip absent
    // nodes without throwing any exceptions.
    for (Map.Entry<NodeId, ResourceOption> entry : nodeResourceMap.entrySet()) {
      ResourceOption newResourceOption = entry.getValue();
      NodeId nodeId = entry.getKey();
      RMNode node = this.rmContext.getRMNodes().get(nodeId);
      if (node == null) {
        LOG.warn("Resource update get failed on an unrecognized node: " + nodeId);
      } else {
        node.setResourceOption(newResourceOption);
        LOG.info("Update resource successfully on node(" + node.getNodeID()
            +") with resource(" + newResourceOption.toString() + ")");
      }
    }
    UpdateNodeResourceResponse response = recordFactory.newRecordInstance(
          UpdateNodeResourceResponse.class);
      return response;
View Full Code Here

    // do resource update on each node.
    // Notice: it is still possible to have invalid NodeIDs as nodes decommission
    // may happen just at the same time. This time, only log and skip absent
    // nodes without throwing any exceptions.
    for (Map.Entry<NodeId, ResourceOption> entry : nodeResourceMap.entrySet()) {
      ResourceOption newResourceOption = entry.getValue();
      NodeId nodeId = entry.getKey();
      RMNode node = this.rmContext.getRMNodes().get(nodeId);
      if (node == null) {
        LOG.warn("Resource update get failed on an unrecognized node: " + nodeId);
      } else {
        node.setResourceOption(newResourceOption);
        LOG.info("Update resource successfully on node(" + node.getNodeID()
            +") with resource(" + newResourceOption.toString() + ")");
      }
    }
    UpdateNodeResourceResponse response = recordFactory.newRecordInstance(
          UpdateNodeResourceResponse.class);
      return response;
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.api.records.ResourceOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.