Search in sources :

Example 6 with NodeLabelProto

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));
    }
}
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)6 NodeLabelProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeLabelProto)6 ArrayList (java.util.ArrayList)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 AddToClusterNodeLabelsRequestProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.AddToClusterNodeLabelsRequestProtoOrBuilder)1 GetClusterNodeLabelsResponseProtoOrBuilder (org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodeLabelsResponseProtoOrBuilder)1