Java 类org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto 实例源码

项目:hadoop    文件:GetContainerStatusesRequestPBImpl.java   
private void addLocalContainerIdsToProto() {
  maybeInitBuilder();
  builder.clearContainerId();
  if (this.containerIds == null)
    return;
  List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
  for (ContainerId id : containerIds) {
    protoList.add(convertToProtoFormat(id));
  }
  builder.addAllContainerId(protoList);
}
项目:hadoop    文件:StopContainersResponsePBImpl.java   
private void addSucceededRequestsToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededRequests == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededRequests.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:hadoop    文件:StopContainersResponsePBImpl.java   
private void initSucceededRequests() {
  if (this.succeededRequests != null)
    return;
  StopContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededRequests = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededRequests.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:StopContainersRequestPBImpl.java   
private void addLocalContainerIdsToProto() {
  maybeInitBuilder();
  builder.clearContainerId();
  if (this.containerIds == null)
    return;
  List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
  for (ContainerId id : containerIds) {
    protoList.add(convertToProtoFormat(id));
  }
  builder.addAllContainerId(protoList);
}
项目:hadoop    文件:AllocateRequestPBImpl.java   
private void initReleases() {
  if (this.release != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getReleaseList();
  this.release = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.release.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:AllocateRequestPBImpl.java   
private void addReleasesToProto() {
  maybeInitBuilder();
  builder.clearRelease();
  if (release == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = release.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllRelease(iterable);
}
项目:hadoop    文件:StartContainersResponsePBImpl.java   
private void addSucceededContainersToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededContainers == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededContainers.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:hadoop    文件:StartContainersResponsePBImpl.java   
private void initSucceededContainers() {
  if (this.succeededContainers != null)
    return;
  StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededContainers = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededContainers.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:NodeHeartbeatResponsePBImpl.java   
private void initContainersToCleanup() {
  if (this.containersToCleanup != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToCleanupList();
  this.containersToCleanup = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToCleanup.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:NodeHeartbeatResponsePBImpl.java   
private void initContainersToBeRemovedFromNM() {
  if (this.containersToBeRemovedFromNM != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToBeRemovedFromNmList();
  this.containersToBeRemovedFromNM = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToBeRemovedFromNM.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:NodeHeartbeatResponsePBImpl.java   
private void addContainersToCleanupToProto() {
  maybeInitBuilder();
  builder.clearContainersToCleanup();
  if (containersToCleanup == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToCleanup.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToCleanup(iterable);
}
项目:hadoop    文件:NodeHeartbeatResponsePBImpl.java   
private void addContainersToBeRemovedFromNMToProto() {
  maybeInitBuilder();
  builder.clearContainersToBeRemovedFromNm();
  if (containersToBeRemovedFromNM == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToBeRemovedFromNM.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToBeRemovedFromNm(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:StopContainersResponsePBImpl.java   
private void addSucceededRequestsToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededRequests == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededRequests.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:StopContainersResponsePBImpl.java   
private void initSucceededRequests() {
  if (this.succeededRequests != null)
    return;
  StopContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededRequests = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededRequests.add(convertFromProtoFormat(c));
  }
}
项目:big-c    文件:NodeHeartbeatResponsePBImpl.java   
private void initContainersToBeRemovedFromNM() {
  if (this.containersToBeRemovedFromNM != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToBeRemovedFromNmList();
  this.containersToBeRemovedFromNM = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToBeRemovedFromNM.add(convertFromProtoFormat(c));
  }
}
项目:aliyun-oss-hadoop-fs    文件:StopContainersRequestPBImpl.java   
private void addLocalContainerIdsToProto() {
  maybeInitBuilder();
  builder.clearContainerId();
  if (this.containerIds == null)
    return;
  List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
  for (ContainerId id : containerIds) {
    protoList.add(convertToProtoFormat(id));
  }
  builder.addAllContainerId(protoList);
}
项目:aliyun-oss-hadoop-fs    文件:AllocateRequestPBImpl.java   
private void initReleases() {
  if (this.release != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getReleaseList();
  this.release = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.release.add(convertFromProtoFormat(c));
  }
}
项目:aliyun-oss-hadoop-fs    文件:AllocateRequestPBImpl.java   
private void addReleasesToProto() {
  maybeInitBuilder();
  builder.clearRelease();
  if (release == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = release.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllRelease(iterable);
}
项目:big-c    文件:NodeHeartbeatResponsePBImpl.java   
private void addContainersToBeRemovedFromNMToProto() {
  maybeInitBuilder();
  builder.clearContainersToBeRemovedFromNm();
  if (containersToBeRemovedFromNM == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToBeRemovedFromNM.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToBeRemovedFromNm(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:IncreaseContainersResourceResponsePBImpl.java   
private void addSucceededRequestsToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededRequests == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {
        Iterator<ContainerId> iter = succeededRequests.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:StartContainersResponsePBImpl.java   
private void addSucceededContainersToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededContainers == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededContainers.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:StartContainersResponsePBImpl.java   
private void initSucceededContainers() {
  if (this.succeededContainers != null)
    return;
  StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededContainers = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededContainers.add(convertFromProtoFormat(c));
  }
}
项目:big-c    文件:NodeHeartbeatResponsePBImpl.java   
private void addContainersToCleanupToProto() {
  maybeInitBuilder();
  builder.clearContainersToCleanup();
  if (containersToCleanup == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToCleanup.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToCleanup(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:NodeHeartbeatResponsePBImpl.java   
private void initContainersToCleanup() {
  if (this.containersToCleanup != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToCleanupList();
  this.containersToCleanup = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToCleanup.add(convertFromProtoFormat(c));
  }
}
项目:aliyun-oss-hadoop-fs    文件:NodeHeartbeatResponsePBImpl.java   
private void addContainersToCleanupToProto() {
  maybeInitBuilder();
  builder.clearContainersToCleanup();
  if (containersToCleanup == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToCleanup.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToCleanup(iterable);
}
项目:aliyun-oss-hadoop-fs    文件:NodeHeartbeatResponsePBImpl.java   
private void addContainersToBeRemovedFromNMToProto() {
  maybeInitBuilder();
  builder.clearContainersToBeRemovedFromNm();
  if (containersToBeRemovedFromNM == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {

    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = containersToBeRemovedFromNM.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllContainersToBeRemovedFromNm(iterable);
}
项目:big-c    文件:GetContainerStatusesRequestPBImpl.java   
private void addLocalContainerIdsToProto() {
  maybeInitBuilder();
  builder.clearContainerId();
  if (this.containerIds == null)
    return;
  List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
  for (ContainerId id : containerIds) {
    protoList.add(convertToProtoFormat(id));
  }
  builder.addAllContainerId(protoList);
}
项目:big-c    文件:StopContainersResponsePBImpl.java   
private void addSucceededRequestsToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededRequests == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededRequests.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:big-c    文件:StopContainersResponsePBImpl.java   
private void initSucceededRequests() {
  if (this.succeededRequests != null)
    return;
  StopContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededRequests = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededRequests.add(convertFromProtoFormat(c));
  }
}
项目:big-c    文件:StopContainersRequestPBImpl.java   
private void addLocalContainerIdsToProto() {
  maybeInitBuilder();
  builder.clearContainerId();
  if (this.containerIds == null)
    return;
  List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
  for (ContainerId id : containerIds) {
    protoList.add(convertToProtoFormat(id));
  }
  builder.addAllContainerId(protoList);
}
项目:big-c    文件:AllocateRequestPBImpl.java   
private void initReleases() {
  if (this.release != null) {
    return;
  }
  AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getReleaseList();
  this.release = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.release.add(convertFromProtoFormat(c));
  }
}
项目:big-c    文件:AllocateRequestPBImpl.java   
private void addReleasesToProto() {
  maybeInitBuilder();
  builder.clearRelease();
  if (release == null)
    return;
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = release.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };

    }
  };
  builder.addAllRelease(iterable);
}
项目:big-c    文件:StartContainersResponsePBImpl.java   
private void addSucceededContainersToProto() {
  maybeInitBuilder();
  builder.clearSucceededRequests();
  if (this.succeededContainers == null) {
    return;
  }
  Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
    @Override
    public Iterator<ContainerIdProto> iterator() {
      return new Iterator<ContainerIdProto>() {

        Iterator<ContainerId> iter = succeededContainers.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public ContainerIdProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();

        }
      };
    }
  };
  builder.addAllSucceededRequests(iterable);
}
项目:big-c    文件:StartContainersResponsePBImpl.java   
private void initSucceededContainers() {
  if (this.succeededContainers != null)
    return;
  StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getSucceededRequestsList();
  this.succeededContainers = new ArrayList<ContainerId>();
  for (ContainerIdProto c : list) {
    this.succeededContainers.add(convertFromProtoFormat(c));
  }
}
项目:big-c    文件:NodeHeartbeatResponsePBImpl.java   
private void initContainersToCleanup() {
  if (this.containersToCleanup != null) {
    return;
  }
  NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<ContainerIdProto> list = p.getContainersToCleanupList();
  this.containersToCleanup = new ArrayList<ContainerId>();

  for (ContainerIdProto c : list) {
    this.containersToCleanup.add(convertFromProtoFormat(c));
  }
}
项目:hadoop    文件:GetContainerStatusesRequestPBImpl.java   
private ContainerIdPBImpl convertFromProtoFormat(ContainerIdProto p) {
  return new ContainerIdPBImpl(p);
}
项目:hadoop    文件:GetContainerStatusesRequestPBImpl.java   
private ContainerIdProto convertToProtoFormat(ContainerId t) {
  return ((ContainerIdPBImpl) t).getProto();
}
项目:hadoop    文件:StopContainersResponsePBImpl.java   
private ContainerIdPBImpl convertFromProtoFormat(ContainerIdProto p) {
  return new ContainerIdPBImpl(p);
}
项目:hadoop    文件:StopContainersResponsePBImpl.java   
private ContainerIdProto convertToProtoFormat(ContainerId t) {
  return ((ContainerIdPBImpl) t).getProto();
}
项目:hadoop    文件:StopContainersRequestPBImpl.java   
private ContainerIdPBImpl convertFromProtoFormat(ContainerIdProto p) {
  return new ContainerIdPBImpl(p);
}