Search in sources :

Example 1 with UpdateNodeResourceRequestProtoOrBuilder

use of org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.UpdateNodeResourceRequestProtoOrBuilder in project hadoop by apache.

the class UpdateNodeResourceRequestPBImpl method initNodeResourceMap.

private void initNodeResourceMap() {
    if (this.nodeResourceMap != null) {
        return;
    }
    UpdateNodeResourceRequestProtoOrBuilder p = viaProto ? proto : builder;
    List<NodeResourceMapProto> list = p.getNodeResourceMapList();
    this.nodeResourceMap = new HashMap<NodeId, ResourceOption>(list.size());
    for (NodeResourceMapProto nodeResourceProto : list) {
        this.nodeResourceMap.put(convertFromProtoFormat(nodeResourceProto.getNodeId()), convertFromProtoFormat(nodeResourceProto.getResourceOption()));
    }
}
Also used : NodeResourceMapProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeResourceMapProto) ResourceOption(org.apache.hadoop.yarn.api.records.ResourceOption) UpdateNodeResourceRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.UpdateNodeResourceRequestProtoOrBuilder) NodeId(org.apache.hadoop.yarn.api.records.NodeId)

Aggregations

NodeId (org.apache.hadoop.yarn.api.records.NodeId)1 ResourceOption (org.apache.hadoop.yarn.api.records.ResourceOption)1 NodeResourceMapProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeResourceMapProto)1 UpdateNodeResourceRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.UpdateNodeResourceRequestProtoOrBuilder)1