Java 类org.apache.hadoop.yarn.api.records.impl.pb.NodeIdPBImpl 实例源码

项目:hadoop    文件:GetLabelsToNodesResponsePBImpl.java   
private void initLabelsToNodes() {
  if (this.labelsToNodes != null) {
    return;
  }
  GetLabelsToNodesResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<LabelsToNodeIdsProto> list = p.getLabelsToNodesList();
  this.labelsToNodes = new HashMap<String, Set<NodeId>>();

  for (LabelsToNodeIdsProto c : list) {
    Set<NodeId> setNodes = new HashSet<NodeId>();
    for(NodeIdProto n : c.getNodeIdList()) {
      NodeId node = new NodeIdPBImpl(n);
      setNodes.add(node);
    }
    if(!setNodes.isEmpty()) {
      this.labelsToNodes.put(c.getNodeLabels(), setNodes);
    }
  }
}
项目:hadoop    文件:ContainerStartDataPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.containerId != null
      && !((ContainerIdPBImpl) this.containerId).getProto().equals(
        builder.getContainerId())) {
    builder.setContainerId(convertToProtoFormat(this.containerId));
  }
  if (this.resource != null
      && !((ResourcePBImpl) this.resource).getProto().equals(
        builder.getAllocatedResource())) {
    builder.setAllocatedResource(convertToProtoFormat(this.resource));
  }
  if (this.nodeId != null
      && !((NodeIdPBImpl) this.nodeId).getProto().equals(
        builder.getAssignedNodeId())) {
    builder.setAssignedNodeId(convertToProtoFormat(this.nodeId));
  }
  if (this.priority != null
      && !((PriorityPBImpl) this.priority).getProto().equals(
        builder.getPriority())) {
    builder.setPriority(convertToProtoFormat(this.priority));
  }
}
项目:aliyun-oss-hadoop-fs    文件:GetLabelsToNodesResponsePBImpl.java   
private void initLabelsToNodes() {
  if (this.labelsToNodes != null) {
    return;
  }
  GetLabelsToNodesResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<LabelsToNodeIdsProto> list = p.getLabelsToNodesList();
  this.labelsToNodes = new HashMap<NodeLabel, Set<NodeId>>();

  for (LabelsToNodeIdsProto c : list) {
    Set<NodeId> setNodes = new HashSet<NodeId>();
    for(NodeIdProto n : c.getNodeIdList()) {
      NodeId node = new NodeIdPBImpl(n);
      setNodes.add(node);
    }
    if (!setNodes.isEmpty()) {
      this.labelsToNodes
          .put(new NodeLabelPBImpl(c.getNodeLabels()), setNodes);
    }
  }
}
项目: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);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ContainerStartDataPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.containerId != null
      && !((ContainerIdPBImpl) this.containerId).getProto().equals(
        builder.getContainerId())) {
    builder.setContainerId(convertToProtoFormat(this.containerId));
  }
  if (this.resource != null
      && !((ResourcePBImpl) this.resource).getProto().equals(
        builder.getAllocatedResource())) {
    builder.setAllocatedResource(convertToProtoFormat(this.resource));
  }
  if (this.nodeId != null
      && !((NodeIdPBImpl) this.nodeId).getProto().equals(
        builder.getAssignedNodeId())) {
    builder.setAssignedNodeId(convertToProtoFormat(this.nodeId));
  }
  if (this.priority != null
      && !((PriorityPBImpl) this.priority).getProto().equals(
        builder.getPriority())) {
    builder.setPriority(convertToProtoFormat(this.priority));
  }
}
项目:big-c    文件:GetLabelsToNodesResponsePBImpl.java   
private void initLabelsToNodes() {
  if (this.labelsToNodes != null) {
    return;
  }
  GetLabelsToNodesResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<LabelsToNodeIdsProto> list = p.getLabelsToNodesList();
  this.labelsToNodes = new HashMap<String, Set<NodeId>>();

  for (LabelsToNodeIdsProto c : list) {
    Set<NodeId> setNodes = new HashSet<NodeId>();
    for(NodeIdProto n : c.getNodeIdList()) {
      NodeId node = new NodeIdPBImpl(n);
      setNodes.add(node);
    }
    if(!setNodes.isEmpty()) {
      this.labelsToNodes.put(c.getNodeLabels(), setNodes);
    }
  }
}
项目:big-c    文件:ContainerStartDataPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.containerId != null
      && !((ContainerIdPBImpl) this.containerId).getProto().equals(
        builder.getContainerId())) {
    builder.setContainerId(convertToProtoFormat(this.containerId));
  }
  if (this.resource != null
      && !((ResourcePBImpl) this.resource).getProto().equals(
        builder.getAllocatedResource())) {
    builder.setAllocatedResource(convertToProtoFormat(this.resource));
  }
  if (this.nodeId != null
      && !((NodeIdPBImpl) this.nodeId).getProto().equals(
        builder.getAssignedNodeId())) {
    builder.setAssignedNodeId(convertToProtoFormat(this.nodeId));
  }
  if (this.priority != null
      && !((PriorityPBImpl) this.priority).getProto().equals(
        builder.getPriority())) {
    builder.setPriority(convertToProtoFormat(this.priority));
  }
}
项目:hops    文件:GetLabelsToNodesResponsePBImpl.java   
private void initLabelsToNodes() {
  if (this.labelsToNodes != null) {
    return;
  }
  GetLabelsToNodesResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<LabelsToNodeIdsProto> list = p.getLabelsToNodesList();
  this.labelsToNodes = new HashMap<String, Set<NodeId>>();

  for (LabelsToNodeIdsProto c : list) {
    Set<NodeId> setNodes = new HashSet<NodeId>();
    for(NodeIdProto n : c.getNodeIdList()) {
      NodeId node = new NodeIdPBImpl(n);
      setNodes.add(node);
    }
    if (!setNodes.isEmpty()) {
      this.labelsToNodes
          .put(c.getNodeLabels(), setNodes);
    }
  }
}
项目:hops    文件:ContainerStartDataPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.containerId != null
      && !((ContainerIdPBImpl) this.containerId).getProto().equals(
        builder.getContainerId())) {
    builder.setContainerId(convertToProtoFormat(this.containerId));
  }
  if (this.resource != null
      && !((ResourcePBImpl) this.resource).getProto().equals(
        builder.getAllocatedResource())) {
    builder.setAllocatedResource(convertToProtoFormat(this.resource));
  }
  if (this.nodeId != null
      && !((NodeIdPBImpl) this.nodeId).getProto().equals(
        builder.getAssignedNodeId())) {
    builder.setAssignedNodeId(convertToProtoFormat(this.nodeId));
  }
  if (this.priority != null
      && !((PriorityPBImpl) this.priority).getProto().equals(
        builder.getPriority())) {
    builder.setPriority(convertToProtoFormat(this.priority));
  }
}
项目:hadoop-on-lustre2    文件:ContainerStartDataPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.containerId != null
      && !((ContainerIdPBImpl) this.containerId).getProto().equals(
        builder.getContainerId())) {
    builder.setContainerId(convertToProtoFormat(this.containerId));
  }
  if (this.resource != null
      && !((ResourcePBImpl) this.resource).getProto().equals(
        builder.getAllocatedResource())) {
    builder.setAllocatedResource(convertToProtoFormat(this.resource));
  }
  if (this.nodeId != null
      && !((NodeIdPBImpl) this.nodeId).getProto().equals(
        builder.getAssignedNodeId())) {
    builder.setAssignedNodeId(convertToProtoFormat(this.nodeId));
  }
  if (this.priority != null
      && !((PriorityPBImpl) this.priority).getProto().equals(
        builder.getPriority())) {
    builder.setPriority(convertToProtoFormat(this.priority));
  }
}
项目:hadoop    文件:NMTokenIdentifier.java   
public NMTokenIdentifier(ApplicationAttemptId appAttemptId, 
    NodeId nodeId, String applicationSubmitter, int masterKeyId) {
  NMTokenIdentifierProto.Builder builder = NMTokenIdentifierProto.newBuilder();
  if (appAttemptId != null) {
    builder.setAppAttemptId(
        ((ApplicationAttemptIdPBImpl)appAttemptId).getProto());
  }
  if (nodeId != null) {
    builder.setNodeId(((NodeIdPBImpl)nodeId).getProto());
  }
  builder.setAppSubmitter(applicationSubmitter);
  builder.setKeyId(masterKeyId);
  proto = builder.build();
}
项目: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()));
  }
}
项目:hadoop    文件:ReplaceLabelsOnNodeRequestPBImpl.java   
private void initNodeToLabels() {
  if (this.nodeIdToLabels != null) {
    return;
  }
  ReplaceLabelsOnNodeRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<NodeIdToLabelsProto> list = p.getNodeToLabelsList();
  this.nodeIdToLabels = new HashMap<NodeId, Set<String>>();

  for (NodeIdToLabelsProto c : list) {
    this.nodeIdToLabels.put(new NodeIdPBImpl(c.getNodeId()),
        Sets.newHashSet(c.getNodeLabelsList()));
  }
}
项目:aliyun-oss-hadoop-fs    文件:NMTokenIdentifier.java   
public NMTokenIdentifier(ApplicationAttemptId appAttemptId, 
    NodeId nodeId, String applicationSubmitter, int masterKeyId) {
  NMTokenIdentifierProto.Builder builder = NMTokenIdentifierProto.newBuilder();
  if (appAttemptId != null) {
    builder.setAppAttemptId(
        ((ApplicationAttemptIdPBImpl)appAttemptId).getProto());
  }
  if (nodeId != null) {
    builder.setNodeId(((NodeIdPBImpl)nodeId).getProto());
  }
  builder.setAppSubmitter(applicationSubmitter);
  builder.setKeyId(masterKeyId);
  proto = builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:ReplaceLabelsOnNodeRequestPBImpl.java   
private void initNodeToLabels() {
  if (this.nodeIdToLabels != null) {
    return;
  }
  ReplaceLabelsOnNodeRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<NodeIdToLabelsNameProto> list = p.getNodeToLabelsList();
  this.nodeIdToLabels = new HashMap<NodeId, Set<String>>();

  for (NodeIdToLabelsNameProto c : list) {
    this.nodeIdToLabels.put(new NodeIdPBImpl(c.getNodeId()),
        Sets.newHashSet(c.getNodeLabelsList()));
  }
}
项目:big-c    文件:NMTokenIdentifier.java   
public NMTokenIdentifier(ApplicationAttemptId appAttemptId, 
    NodeId nodeId, String applicationSubmitter, int masterKeyId) {
  NMTokenIdentifierProto.Builder builder = NMTokenIdentifierProto.newBuilder();
  if (appAttemptId != null) {
    builder.setAppAttemptId(
        ((ApplicationAttemptIdPBImpl)appAttemptId).getProto());
  }
  if (nodeId != null) {
    builder.setNodeId(((NodeIdPBImpl)nodeId).getProto());
  }
  builder.setAppSubmitter(applicationSubmitter);
  builder.setKeyId(masterKeyId);
  proto = builder.build();
}
项目: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()));
  }
}
项目:big-c    文件:ReplaceLabelsOnNodeRequestPBImpl.java   
private void initNodeToLabels() {
  if (this.nodeIdToLabels != null) {
    return;
  }
  ReplaceLabelsOnNodeRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<NodeIdToLabelsProto> list = p.getNodeToLabelsList();
  this.nodeIdToLabels = new HashMap<NodeId, Set<String>>();

  for (NodeIdToLabelsProto c : list) {
    this.nodeIdToLabels.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()));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReplaceLabelsOnNodeRequestPBImpl.java   
private void initNodeToLabels() {
  if (this.nodeIdToLabels != null) {
    return;
  }
  ReplaceLabelsOnNodeRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<NodeIdToLabelsProto> list = p.getNodeToLabelsList();
  this.nodeIdToLabels = new HashMap<NodeId, Set<String>>();

  for (NodeIdToLabelsProto c : list) {
    this.nodeIdToLabels.put(new NodeIdPBImpl(c.getNodeId()),
        Sets.newHashSet(c.getNodeLabelsList()));
  }
}
项目:hops    文件:NMTokenIdentifier.java   
public NMTokenIdentifier(ApplicationAttemptId appAttemptId, 
    NodeId nodeId, String applicationSubmitter, int masterKeyId) {
  NMTokenIdentifierProto.Builder builder = NMTokenIdentifierProto.newBuilder();
  if (appAttemptId != null) {
    builder.setAppAttemptId(
        ((ApplicationAttemptIdPBImpl)appAttemptId).getProto());
  }
  if (nodeId != null) {
    builder.setNodeId(((NodeIdPBImpl)nodeId).getProto());
  }
  builder.setAppSubmitter(applicationSubmitter);
  builder.setKeyId(masterKeyId);
  proto = builder.build();
}
项目: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()));
  }
}
项目:hops    文件:ReplaceLabelsOnNodeRequestPBImpl.java   
private void initNodeToLabels() {
  if (this.nodeIdToLabels != null) {
    return;
  }
  ReplaceLabelsOnNodeRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<NodeIdToLabelsProto> list = p.getNodeToLabelsList();
  this.nodeIdToLabels = new HashMap<NodeId, Set<String>>();

  for (NodeIdToLabelsProto c : list) {
    this.nodeIdToLabels.put(new NodeIdPBImpl(c.getNodeId()),
        Sets.newHashSet(c.getNodeLabelsList()));
  }
}
项目:incubator-myriad    文件:OfferLifeCycleManagerTest.java   
@Before
public void setUp() throws Exception {
  NodeStore store = new NodeStore();
  NodeIdProto nodeId = NodeIdProto.newBuilder().setHost("localhost").setPort(8000).build();
  RMNode rmNode = new RMNodeImpl(new NodeIdPBImpl(nodeId), new MockRMContext(), "localhost", 8000, 8070, new NodeBase(),
          new ResourcePBImpl(), "1.0");
  SchedulerNode node = new FiCaSchedulerNode(rmNode, false);
  store.add(node);
  manager = new OfferLifecycleManager(store, new MyriadDriver(new MockSchedulerDriver()));
}
项目:hadoop    文件:NMTokenIdentifier.java   
public NodeId getNodeId() {
  if (!proto.hasNodeId()) {
    return null;
  }
  return new NodeIdPBImpl(proto.getNodeId());
}
项目:hadoop    文件:GetLabelsToNodesResponsePBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId t) {
  return ((NodeIdPBImpl)t).getProto();
}
项目:hadoop    文件:GetNodesToLabelsResponsePBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId t) {
  return ((NodeIdPBImpl)t).getProto();
}
项目:hadoop    文件:ReplaceLabelsOnNodeRequestPBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId t) {
  return ((NodeIdPBImpl) t).getProto();
}
项目:hadoop    文件:UpdateNodeResourceRequestPBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId nodeId) {
  return ((NodeIdPBImpl)nodeId).getProto();
}
项目:hadoop    文件:UpdateNodeResourceRequestPBImpl.java   
private NodeId convertFromProtoFormat(NodeIdProto proto) {
  return new NodeIdPBImpl(proto);
}
项目:hadoop    文件:RegisterNodeManagerRequestPBImpl.java   
private NodeIdPBImpl convertFromProtoFormat(NodeIdProto p) {
  return new NodeIdPBImpl(p);
}
项目:hadoop    文件:RegisterNodeManagerRequestPBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId t) {
  return ((NodeIdPBImpl)t).getProto();
}
项目:hadoop    文件:NodeStatusPBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId nodeId) {
  return ((NodeIdPBImpl)nodeId).getProto();
}
项目:hadoop    文件:NodeStatusPBImpl.java   
private NodeId convertFromProtoFormat(NodeIdProto proto) {
  return new NodeIdPBImpl(proto);
}
项目:hadoop    文件:NMTokenIdentifierNewForTest.java   
public NodeId getNodeId() {
  return new NodeIdPBImpl(proto.getNodeId());
}
项目:hadoop    文件:ContainerStartDataPBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId nodeId) {
  return ((NodeIdPBImpl) nodeId).getProto();
}
项目:hadoop    文件:ContainerStartDataPBImpl.java   
private NodeIdPBImpl convertFromProtoFormat(NodeIdProto nodeId) {
  return new NodeIdPBImpl(nodeId);
}
项目:aliyun-oss-hadoop-fs    文件:NMTokenIdentifier.java   
public NodeId getNodeId() {
  if (!proto.hasNodeId()) {
    return null;
  }
  return new NodeIdPBImpl(proto.getNodeId());
}
项目:aliyun-oss-hadoop-fs    文件:GetLabelsToNodesResponsePBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId t) {
  return ((NodeIdPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:GetNodesToLabelsResponsePBImpl.java   
private NodeIdProto convertToProtoFormat(NodeId t) {
  return ((NodeIdPBImpl)t).getProto();
}