use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto in project hadoop by apache.
the class NodeHeartbeatRequestPBImpl method initNodeLabels.
private void initNodeLabels() {
if (this.labels != null) {
return;
}
NodeHeartbeatRequestProtoOrBuilder 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));
}
}
use of org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto 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