示例#1
0
 /// <summary>
 /// Create a direct connection to RM instead of a remote connection when
 /// the proxy is running as part of the RM.
 /// </summary>
 /// <remarks>
 /// Create a direct connection to RM instead of a remote connection when
 /// the proxy is running as part of the RM. Also create a remote connection to
 /// Application History Server if it is enabled.
 /// </remarks>
 /// <param name="conf">the configuration to use</param>
 /// <param name="applicationsManager">what to use to get the RM reports.</param>
 public AppReportFetcher(Configuration conf, ApplicationClientProtocol applicationsManager
                         )
 {
     if (conf.GetBoolean(YarnConfiguration.ApplicationHistoryEnabled, YarnConfiguration
                         .DefaultApplicationHistoryEnabled))
     {
         isAHSEnabled = true;
     }
     this.conf = conf;
     this.applicationsManager = applicationsManager;
     if (isAHSEnabled)
     {
         try
         {
             historyManager = GetAHSProxy(conf);
         }
         catch (IOException e)
         {
             throw new YarnRuntimeException(e);
         }
     }
     else
     {
         this.historyManager = null;
     }
 }
示例#2
0
 /// <exception cref="System.Exception"/>
 protected override void ServiceStart()
 {
     try
     {
         ahsClient = AHSProxy.CreateAHSProxy <ApplicationHistoryProtocol>(GetConfig(), this
                                                                          .ahsAddress);
     }
     catch (IOException e)
     {
         throw new YarnRuntimeException(e);
     }
     base.ServiceStart();
 }
 public ApplicationHistoryProtocolPBServiceImpl(ApplicationHistoryProtocol impl)
 {
     this.real = impl;
 }
示例#4
0
 public virtual void CleanUp()
 {
     historyManager = null;
     appManager     = null;
     fetcher        = null;
 }