示例#1
0
 public virtual YarnServiceProtos.GetContainersRequestProto GetProto()
 {
     MergeLocalToProto();
     proto = viaProto ? proto : ((YarnServiceProtos.GetContainersRequestProto)builder.
                                 Build());
     viaProto = true;
     return(proto);
 }
示例#2
0
 private void MergeLocalToProto()
 {
     if (viaProto)
     {
         MaybeInitBuilder();
     }
     MergeLocalToBuilder();
     proto    = ((YarnServiceProtos.GetContainersRequestProto)builder.Build());
     viaProto = true;
 }
 /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/>
 /// <exception cref="System.IO.IOException"/>
 public virtual GetContainersResponse GetContainers(GetContainersRequest request)
 {
     YarnServiceProtos.GetContainersRequestProto requestProto = ((GetContainersRequestPBImpl
                                                                  )request).GetProto();
     try
     {
         return(new GetContainersResponsePBImpl(proxy.GetContainers(null, requestProto)));
     }
     catch (ServiceException e)
     {
         RPCUtil.UnwrapAndThrowException(e);
         return(null);
     }
 }
        /// <exception cref="Com.Google.Protobuf.ServiceException"/>
        public virtual YarnServiceProtos.GetContainersResponseProto GetContainers(RpcController
                                                                                  controller, YarnServiceProtos.GetContainersRequestProto proto)
        {
            GetContainersRequestPBImpl request = new GetContainersRequestPBImpl(proto);

            try
            {
                GetContainersResponse response = real.GetContainers(request);
                return(((GetContainersResponsePBImpl)response).GetProto());
            }
            catch (YarnException e)
            {
                throw new ServiceException(e);
            }
            catch (IOException e)
            {
                throw new ServiceException(e);
            }
        }
示例#5
0
 public GetContainersRequestPBImpl(YarnServiceProtos.GetContainersRequestProto proto
                                   )
 {
     this.proto = proto;
     viaProto   = true;
 }