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

项目:hadoop    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetNodesToLabelsResponse getNodeToLabels(
    GetNodesToLabelsRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetNodesToLabelsRequestProto
      requestProto =
      ((GetNodesToLabelsRequestPBImpl) request).getProto();
  try {
    return new GetNodesToLabelsResponsePBImpl(proxy.getNodeToLabels(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hadoop    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetLabelsToNodesResponse getLabelsToNodes(
    GetLabelsToNodesRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetLabelsToNodesRequestProto requestProto =
      ((GetLabelsToNodesRequestPBImpl) request).getProto();
  try {
    return new GetLabelsToNodesResponsePBImpl(proxy.getLabelsToNodes(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hadoop    文件:SCMAdminProtocolPBClientImpl.java   
@Override
public RunSharedCacheCleanerTaskResponse runCleanerTask(
    RunSharedCacheCleanerTaskRequest request) throws YarnException,
    IOException {
  YarnServiceProtos.RunSharedCacheCleanerTaskRequestProto requestProto =
      ((RunSharedCacheCleanerTaskRequestPBImpl) request).getProto();
  try {
    return new RunSharedCacheCleanerTaskResponsePBImpl(proxy.runCleanerTask(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetNodesToLabelsResponse getNodeToLabels(
    GetNodesToLabelsRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetNodesToLabelsRequestProto
      requestProto =
      ((GetNodesToLabelsRequestPBImpl) request).getProto();
  try {
    return new GetNodesToLabelsResponsePBImpl(proxy.getNodeToLabels(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetLabelsToNodesResponse getLabelsToNodes(
    GetLabelsToNodesRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetLabelsToNodesRequestProto requestProto =
      ((GetLabelsToNodesRequestPBImpl) request).getProto();
  try {
    return new GetLabelsToNodesResponsePBImpl(proxy.getLabelsToNodes(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public SignalContainerResponse signalContainer(
    SignalContainerRequest request) throws YarnException, IOException {
  YarnServiceProtos.SignalContainerRequestProto requestProto =
      ((SignalContainerRequestPBImpl) request).getProto();
  try {
    return new SignalContainerResponsePBImpl(
        proxy.signalContainer(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:SCMAdminProtocolPBClientImpl.java   
@Override
public RunSharedCacheCleanerTaskResponse runCleanerTask(
    RunSharedCacheCleanerTaskRequest request) throws YarnException,
    IOException {
  YarnServiceProtos.RunSharedCacheCleanerTaskRequestProto requestProto =
      ((RunSharedCacheCleanerTaskRequestPBImpl) request).getProto();
  try {
    return new RunSharedCacheCleanerTaskResponsePBImpl(proxy.runCleanerTask(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:big-c    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetNodesToLabelsResponse getNodeToLabels(
    GetNodesToLabelsRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetNodesToLabelsRequestProto
      requestProto =
      ((GetNodesToLabelsRequestPBImpl) request).getProto();
  try {
    return new GetNodesToLabelsResponsePBImpl(proxy.getNodeToLabels(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:big-c    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetLabelsToNodesResponse getLabelsToNodes(
    GetLabelsToNodesRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetLabelsToNodesRequestProto requestProto =
      ((GetLabelsToNodesRequestPBImpl) request).getProto();
  try {
    return new GetLabelsToNodesResponsePBImpl(proxy.getLabelsToNodes(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:big-c    文件:SCMAdminProtocolPBClientImpl.java   
@Override
public RunSharedCacheCleanerTaskResponse runCleanerTask(
    RunSharedCacheCleanerTaskRequest request) throws YarnException,
    IOException {
  YarnServiceProtos.RunSharedCacheCleanerTaskRequestProto requestProto =
      ((RunSharedCacheCleanerTaskRequestPBImpl) request).getProto();
  try {
    return new RunSharedCacheCleanerTaskResponsePBImpl(proxy.runCleanerTask(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetNodesToLabelsResponse getNodeToLabels(
    GetNodesToLabelsRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetNodesToLabelsRequestProto
      requestProto =
      ((GetNodesToLabelsRequestPBImpl) request).getProto();
  try {
    return new GetNodesToLabelsResponsePBImpl(proxy.getNodeToLabels(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalUpdatedContainerList() {
  if (this.updatedContainers != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<YarnServiceProtos.UpdatedContainerProto> list =
      p.getUpdatedContainersList();
  updatedContainers = new ArrayList<>();

  for (YarnServiceProtos.UpdatedContainerProto c : list) {
    updatedContainers.add(convertFromProtoFormat(c));
  }
}
项目:hops    文件:AllocateResponsePBImpl.java   
private synchronized void initLocalUpdateErrorsList() {
  if (updateErrors != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<YarnServiceProtos.UpdateContainerErrorProto> list =
      p.getUpdateErrorsList();
  this.updateErrors = new ArrayList<UpdateContainerError>();
  for (YarnServiceProtos.UpdateContainerErrorProto t : list) {
    updateErrors.add(ProtoUtils.convertFromProtoFormat(t));
  }
}
项目:hops    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<YarnServiceProtos.UpdateContainerErrorProto>
    getUpdateErrorsIterable(
    final List<UpdateContainerError> updateErrorsList) {
  maybeInitBuilder();
  return new Iterable<YarnServiceProtos.UpdateContainerErrorProto>() {
    @Override
    public synchronized Iterator<YarnServiceProtos
        .UpdateContainerErrorProto> iterator() {
      return new Iterator<YarnServiceProtos.UpdateContainerErrorProto>() {

        private Iterator<UpdateContainerError> iter =
            updateErrorsList.iterator();

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

        @Override
        public synchronized YarnServiceProtos.UpdateContainerErrorProto
            next() {
          return ProtoUtils.convertToProtoFormat(iter.next());
        }

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

    }
  };
}
项目:hops    文件:AllocateResponsePBImpl.java   
private synchronized Iterable<YarnServiceProtos.UpdatedContainerProto>
      getUpdatedContainerProtoIterable(
    final List<UpdatedContainer> newUpdatedContainersList) {
  maybeInitBuilder();
  return new Iterable<YarnServiceProtos.UpdatedContainerProto>() {
    @Override
    public synchronized Iterator<YarnServiceProtos.UpdatedContainerProto>
        iterator() {
      return new Iterator<YarnServiceProtos.UpdatedContainerProto>() {

        private Iterator<UpdatedContainer> iter =
            newUpdatedContainersList.iterator();

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

        @Override
        public synchronized YarnServiceProtos.UpdatedContainerProto next() {
          return convertToProtoFormat(iter.next());
        }

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

        }
      };

    }
  };
}
项目:hops    文件:UpdatedContainerPBImpl.java   
@Override
public ContainerUpdateType getUpdateType() {
  YarnServiceProtos.UpdatedContainerProtoOrBuilder p =
      viaProto ? proto : builder;
  if (!p.hasUpdateType()) {
    return null;
  }
  return ProtoUtils.convertFromProtoFormat(p.getUpdateType());
}
项目:hops    文件:UpdatedContainerPBImpl.java   
@Override
public Container getContainer() {
  YarnServiceProtos.UpdatedContainerProtoOrBuilder p =
      viaProto ? proto : builder;
  if (this.container != null) {
    return this.container;
  }
  if (!p.hasContainer()) {
    return null;
  }
  this.container = ProtoUtils.convertFromProtoFormat(p.getContainer());
  return this.container;
}
项目:hops    文件:UpdateContainerRequestPBImpl.java   
@Override
public int getContainerVersion() {
  YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p =
      viaProto ? proto : builder;
  if (!p.hasContainerVersion()) {
    return 0;
  }
  return p.getContainerVersion();
}
项目:hops    文件:UpdateContainerRequestPBImpl.java   
@Override
public ContainerId getContainerId() {
  YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p =
      viaProto ? proto : builder;
  if (this.existingContainerId != null) {
    return this.existingContainerId;
  }
  if (p.hasContainerId()) {
    this.existingContainerId =
        ProtoUtils.convertFromProtoFormat(p.getContainerId());
  }
  return this.existingContainerId;
}
项目:hops    文件:UpdateContainerRequestPBImpl.java   
@Override
public Resource getCapability() {
  YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p = viaProto ? proto
      : builder;
  if (this.targetCapability != null) {
    return this.targetCapability;
  }
  if (p.hasCapability()) {
    this.targetCapability =
        ProtoUtils.convertFromProtoFormat(p.getCapability());
  }
  return this.targetCapability;
}
项目:hops    文件:UpdateContainerRequestPBImpl.java   
@Override
public ContainerUpdateType getContainerUpdateType() {
  YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p =
      viaProto ? proto : builder;
  if (!p.hasUpdateType()) {
    return null;
  }
  return ProtoUtils.convertFromProtoFormat(p.getUpdateType());
}
项目:hops    文件:UpdateContainerErrorPBImpl.java   
@Override
public String getReason() {
  YarnServiceProtos.UpdateContainerErrorProtoOrBuilder p = viaProto ? proto
      : builder;
  if (this.reason != null) {
    return this.reason;
  }
  if (p.hasReason()) {
    this.reason = p.getReason();
  }
  return this.reason;
}
项目:hops    文件:UpdateContainerErrorPBImpl.java   
@Override
public UpdateContainerRequest getUpdateContainerRequest() {
  YarnServiceProtos.UpdateContainerErrorProtoOrBuilder p = viaProto ? proto
      : builder;
  if (this.updateRequest != null) {
    return this.updateRequest;
  }
  if (p.hasUpdateRequest()) {
    this.updateRequest =
        ProtoUtils.convertFromProtoFormat(p.getUpdateRequest());
  }
  return this.updateRequest;
}
项目:hops    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetNewReservationResponse getNewReservation(
    GetNewReservationRequest request)
  throws YarnException, IOException {
  YarnServiceProtos.GetNewReservationRequestProto requestProto =
      ((GetNewReservationRequestPBImpl) request).getProto();
  try {
    return new GetNewReservationResponsePBImpl(proxy.getNewReservation(null,
      requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public ReservationListResponse listReservations(ReservationListRequest
                   request) throws YarnException, IOException {
  YarnServiceProtos.ReservationListRequestProto requestProto =
      ((ReservationListRequestPBImpl) request).getProto();
  try {
    return new ReservationListResponsePBImpl(proxy.listReservations(null,
    requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetNodesToLabelsResponse getNodeToLabels(
    GetNodesToLabelsRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetNodesToLabelsRequestProto
      requestProto =
      ((GetNodesToLabelsRequestPBImpl) request).getProto();
  try {
    return new GetNodesToLabelsResponsePBImpl(proxy.getNodeToLabels(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public GetLabelsToNodesResponse getLabelsToNodes(
    GetLabelsToNodesRequest request)
    throws YarnException, IOException {
  YarnServiceProtos.GetLabelsToNodesRequestProto requestProto =
      ((GetLabelsToNodesRequestPBImpl) request).getProto();
  try {
    return new GetLabelsToNodesResponsePBImpl(proxy.getLabelsToNodes(
        null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:ApplicationClientProtocolPBClientImpl.java   
@Override
public SignalContainerResponse signalToContainer(
    SignalContainerRequest request) throws YarnException, IOException {
  YarnServiceProtos.SignalContainerRequestProto requestProto =
      ((SignalContainerRequestPBImpl) request).getProto();
  try {
    return new SignalContainerResponsePBImpl(
        proxy.signalToContainer(null, requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hops    文件:SCMAdminProtocolPBClientImpl.java   
@Override
public RunSharedCacheCleanerTaskResponse runCleanerTask(
    RunSharedCacheCleanerTaskRequest request) throws YarnException,
    IOException {
  YarnServiceProtos.RunSharedCacheCleanerTaskRequestProto requestProto =
      ((RunSharedCacheCleanerTaskRequestPBImpl) request).getProto();
  try {
    return new RunSharedCacheCleanerTaskResponsePBImpl(proxy.runCleanerTask(null,
        requestProto));
  } catch (ServiceException e) {
    RPCUtil.unwrapAndThrowException(e);
    return null;
  }
}
项目:hadoop    文件:GetNodesToLabelsRequestPBImpl.java   
public GetNodesToLabelsRequestPBImpl() {
  builder = YarnServiceProtos.GetNodesToLabelsRequestProto.newBuilder();
}
项目:hadoop    文件:GetNodesToLabelsRequestPBImpl.java   
public GetNodesToLabelsRequestPBImpl(
    YarnServiceProtos.GetNodesToLabelsRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop    文件:GetNodesToLabelsRequestPBImpl.java   
public YarnServiceProtos.GetNodesToLabelsRequestProto getProto() {
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:hadoop    文件:ProtoUtils.java   
public static YarnServiceProtos.ApplicationsRequestScopeProto
    convertToProtoFormat(ApplicationsRequestScope e) {
  return YarnServiceProtos.ApplicationsRequestScopeProto.valueOf(e.name());
}
项目:hadoop    文件:ProtoUtils.java   
public static ApplicationsRequestScope convertFromProtoFormat
    (YarnServiceProtos.ApplicationsRequestScopeProto e) {
  return ApplicationsRequestScope.valueOf(e.name());
}
项目:aliyun-oss-hadoop-fs    文件:GetNodesToLabelsRequestPBImpl.java   
public GetNodesToLabelsRequestPBImpl() {
  builder = YarnServiceProtos.GetNodesToLabelsRequestProto.newBuilder();
}
项目:aliyun-oss-hadoop-fs    文件:GetNodesToLabelsRequestPBImpl.java   
public GetNodesToLabelsRequestPBImpl(
    YarnServiceProtos.GetNodesToLabelsRequestProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:aliyun-oss-hadoop-fs    文件:GetNodesToLabelsRequestPBImpl.java   
public YarnServiceProtos.GetNodesToLabelsRequestProto getProto() {
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:aliyun-oss-hadoop-fs    文件:ProtoUtils.java   
public static YarnServiceProtos.ApplicationsRequestScopeProto
    convertToProtoFormat(ApplicationsRequestScope e) {
  return YarnServiceProtos.ApplicationsRequestScopeProto.valueOf(e.name());
}
项目:aliyun-oss-hadoop-fs    文件:ProtoUtils.java   
public static ApplicationsRequestScope convertFromProtoFormat
    (YarnServiceProtos.ApplicationsRequestScopeProto e) {
  return ApplicationsRequestScope.valueOf(e.name());
}
项目:big-c    文件:GetNodesToLabelsRequestPBImpl.java   
public GetNodesToLabelsRequestPBImpl() {
  builder = YarnServiceProtos.GetNodesToLabelsRequestProto.newBuilder();
}