예제 #1
0
        /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/>
        /// <exception cref="System.IO.IOException"/>
        public override IList <ContainerReport> GetContainers(ApplicationAttemptId applicationAttemptId
                                                              )
        {
            GetContainersRequest request = GetContainersRequest.NewInstance(applicationAttemptId
                                                                            );
            GetContainersResponse response = ahsClient.GetContainers(request);

            return(response.GetContainerList());
        }
        /// <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);
            }
        }