Java 类org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNodesToLabelsResponseProtoOrBuilder 实例源码

项目:aliyun-oss-hadoop-fs    文件:GetNodesToLabelsResponsePBImpl.java   
private void initNodeToLabels() {
  if (this.nodeToLabels != null) {
    return;
  }
  GetNodesToLabelsResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NodeIdToLabelsInfoProto> list = p.getNodeToLabelsList();
  this.nodeToLabels = new HashMap<NodeId, Set<NodeLabel>>();

  for (NodeIdToLabelsInfoProto c : list) {
    Set<NodeLabel> labels = new HashSet<NodeLabel>();
    for (NodeLabelProto l : c.getNodeLabelsList()) {
      labels.add(new NodeLabelPBImpl(l));
    }
    this.nodeToLabels.put(new NodeIdPBImpl(c.getNodeId()), labels);
  }
}
项目:hadoop    文件:GetNodesToLabelsResponsePBImpl.java   
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()));
  }
}
项目:big-c    文件:GetNodesToLabelsResponsePBImpl.java   
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()));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:GetNodesToLabelsResponsePBImpl.java   
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()));
  }
}
项目:hops    文件:GetNodesToLabelsResponsePBImpl.java   
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()));
  }
}