예제 #1
0
        /// <exception cref="System.Exception"/>
        protected override void ServiceInit(Configuration conf)
        {
            Configuration config = new YarnConfiguration(conf);

            config.SetBoolean(Dispatcher.DispatcherExitOnErrorKey, true);
            // This is required for WebApps to use https if enabled.
            MRWebAppUtil.Initialize(GetConfig());
            try
            {
                DoSecureLogin(conf);
            }
            catch (IOException ie)
            {
                throw new YarnRuntimeException("History Server Failed to login", ie);
            }
            jobHistoryService       = new JobHistory();
            historyContext          = (HistoryContext)jobHistoryService;
            stateStore              = CreateStateStore(conf);
            this.jhsDTSecretManager = CreateJHSSecretManager(conf, stateStore);
            clientService           = CreateHistoryClientService();
            aggLogDelService        = new AggregatedLogDeletionService();
            hsAdminServer           = new HSAdminServer(aggLogDelService, jobHistoryService);
            AddService(stateStore);
            AddService(new JobHistoryServer.HistoryServerSecretManagerService(this));
            AddService(jobHistoryService);
            AddService(clientService);
            AddService(aggLogDelService);
            AddService(hsAdminServer);
            base.ServiceInit(config);
        }
예제 #2
0
 public HistoryClientService(HistoryContext history, JHSDelegationTokenSecretManager
                             jhsDTSecretManager)
     : base("HistoryClientService")
 {
     this.history            = history;
     this.protocolHandler    = new HistoryClientService.HSClientProtocolHandler(this);
     this.jhsDTSecretManager = jhsDTSecretManager;
 }