use of org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto in project hadoop by apache.
the class RegisterNodeManagerRequestPBImpl method initNodeLabels.
private synchronized void initNodeLabels() {
if (this.labels != null) {
return;
}
RegisterNodeManagerRequestProtoOrBuilder p = viaProto ? proto : builder;
if (!p.hasNodeLabels()) {
labels = null;
return;
}
NodeLabelsProto nodeLabels = p.getNodeLabels();
labels = new HashSet<NodeLabel>();
for (NodeLabelProto nlp : nodeLabels.getNodeLabelsList()) {
labels.add(convertFromProtoFormat(nlp));
}
}
Aggregations