Ejemplo n.º 1
0
 /// <exception cref="System.Exception"/>
 protected override void ServiceInit(Configuration conf)
 {
     asyncApiPollIntervalMillis = conf.GetLong(YarnConfiguration.YarnClientApplicationClientProtocolPollIntervalMs
                                               , YarnConfiguration.DefaultYarnClientApplicationClientProtocolPollIntervalMs);
     asyncApiPollTimeoutMillis = conf.GetLong(YarnConfiguration.YarnClientApplicationClientProtocolPollTimeoutMs
                                              , YarnConfiguration.DefaultYarnClientApplicationClientProtocolPollTimeoutMs);
     submitPollIntervalMillis = asyncApiPollIntervalMillis;
     if (conf.Get(YarnConfiguration.YarnClientAppSubmissionPollIntervalMs) != null)
     {
         submitPollIntervalMillis = conf.GetLong(YarnConfiguration.YarnClientAppSubmissionPollIntervalMs
                                                 , YarnConfiguration.DefaultYarnClientApplicationClientProtocolPollIntervalMs);
     }
     if (conf.GetBoolean(YarnConfiguration.ApplicationHistoryEnabled, YarnConfiguration
                         .DefaultApplicationHistoryEnabled))
     {
         historyServiceEnabled = true;
         historyClient         = AHSClient.CreateAHSClient();
         historyClient.Init(conf);
     }
     if (conf.GetBoolean(YarnConfiguration.TimelineServiceEnabled, YarnConfiguration.DefaultTimelineServiceEnabled
                         ))
     {
         timelineServiceEnabled = true;
         timelineClient         = CreateTimelineClient();
         timelineClient.Init(conf);
         timelineDTRenewer = GetTimelineDelegationTokenRenewer(conf);
         timelineService   = TimelineUtils.BuildTimelineTokenService(conf);
     }
     timelineServiceBestEffort = conf.GetBoolean(YarnConfiguration.TimelineServiceClientBestEffort
                                                 , YarnConfiguration.DefaultTimelineServiceClientBestEffort);
     base.ServiceInit(conf);
 }
Ejemplo n.º 2
0
        public virtual void TestClientStop()
        {
            Configuration conf   = new Configuration();
            AHSClient     client = AHSClient.CreateAHSClient();

            client.Init(conf);
            client.Start();
            client.Stop();
        }