Beispiel #1
0
 /// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/>
 /// <exception cref="System.IO.IOException"/>
 public override ContainerReport GetContainerReport(ContainerId containerId)
 {
     try
     {
         GetContainerReportRequest request = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord
                                             <GetContainerReportRequest>();
         request.SetContainerId(containerId);
         GetContainerReportResponse response = rmClient.GetContainerReport(request);
         return(response.GetContainerReport());
     }
     catch (YarnException e)
     {
         if (!historyServiceEnabled)
         {
             // Just throw it as usual if historyService is not enabled.
             throw;
         }
         // Even if history-service is enabled, treat all exceptions still the same
         // except the following
         if (e.GetType() != typeof(ApplicationNotFoundException) && e.GetType() != typeof(
                 ContainerNotFoundException))
         {
             throw;
         }
         return(historyClient.GetContainerReport(containerId));
     }
 }
        /// <exception cref="Com.Google.Protobuf.ServiceException"/>
        public virtual YarnServiceProtos.GetContainerReportResponseProto GetContainerReport
            (RpcController controller, YarnServiceProtos.GetContainerReportRequestProto proto
            )
        {
            GetContainerReportRequestPBImpl request = new GetContainerReportRequestPBImpl(proto
                                                                                          );

            try
            {
                GetContainerReportResponse response = real.GetContainerReport(request);
                return(((GetContainerReportResponsePBImpl)response).GetProto());
            }
            catch (YarnException e)
            {
                throw new ServiceException(e);
            }
            catch (IOException e)
            {
                throw new ServiceException(e);
            }
        }