Search in sources :

Example 1 with NodeLabelsProto

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));
    }
}
Also used : NodeLabelsProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto) NodeLabel(org.apache.hadoop.yarn.api.records.NodeLabel) NodeLabelProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto) NodeHeartbeatRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)

Example 2 with NodeLabelsProto

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));
    }
}
Also used : NodeLabelsProto(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto) NodeLabel(org.apache.hadoop.yarn.api.records.NodeLabel) NodeLabelProto(org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto) RegisterNodeManagerRequestProtoOrBuilder(org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.RegisterNodeManagerRequestProtoOrBuilder)

Aggregations

NodeLabel (org.apache.hadoop.yarn.api.records.NodeLabel)2 NodeLabelProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto)2 NodeLabelsProto (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeLabelsProto)2 NodeHeartbeatRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProtoOrBuilder)1 RegisterNodeManagerRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.RegisterNodeManagerRequestProtoOrBuilder)1