use of org.apache.hadoop.yarn.proto.YarnProtos.NodeIdToLabelsProto in project hadoop by apache.
the class GetNodesToLabelsResponsePBImpl method initNodeToLabels.
private void initNodeToLabels() {
if (this.nodeToLabels != null) {
return;
}
GetNodesToLabelsResponseProtoOrBuilder p = viaProto ? proto : builder;
List<NodeIdToLabelsProto> list = p.getNodeToLabelsList();
this.nodeToLabels = new HashMap<NodeId, Set<String>>();
for (NodeIdToLabelsProto c : list) {
this.nodeToLabels.put(new NodeIdPBImpl(c.getNodeId()), Sets.newHashSet(c.getNodeLabelsList()));
}
}
use of org.apache.hadoop.yarn.proto.YarnProtos.NodeIdToLabelsProto in project hadoop by apache.
the class ReplaceLabelsOnNodeRequestPBImpl method initNodeToLabels.
private void initNodeToLabels() {
if (this.nodeIdToLabels != null) {
return;
}
ReplaceLabelsOnNodeRequestProtoOrBuilder p = viaProto ? proto : builder;
List<NodeIdToLabelsProto> list = p.getNodeToLabelsList();
this.nodeIdToLabels = new HashMap<NodeId, Set<String>>();
for (NodeIdToLabelsProto c : list) {
this.nodeIdToLabels.put(new NodeIdPBImpl(c.getNodeId()), Sets.newHashSet(c.getNodeLabelsList()));
}
}
Aggregations