/// <summary>Create a timeline secret manager</summary> /// <param name="delegationKeyUpdateInterval">the number of seconds for rolling new secret keys. /// </param> /// <param name="delegationTokenMaxLifetime">the maximum lifetime of the delegation tokens /// </param> /// <param name="delegationTokenRenewInterval">how often the tokens must be renewed</param> /// <param name="delegationTokenRemoverScanInterval">how often the tokens are scanned for expired tokens /// </param> public TimelineDelegationTokenSecretManager(long delegationKeyUpdateInterval, long delegationTokenMaxLifetime, long delegationTokenRenewInterval, long delegationTokenRemoverScanInterval , TimelineStateStore stateStore) : base(delegationKeyUpdateInterval, delegationTokenMaxLifetime, delegationTokenRenewInterval , delegationTokenRemoverScanInterval) { this.stateStore = stateStore; }
/// <exception cref="System.Exception"/> protected override void ServiceInit(Configuration conf) { if (conf.GetBoolean(YarnConfiguration.TimelineServiceRecoveryEnabled, YarnConfiguration .DefaultTimelineServiceRecoveryEnabled)) { stateStore = CreateStateStore(conf); stateStore.Init(conf); } long secretKeyInterval = conf.GetLong(YarnConfiguration.TimelineDelegationKeyUpdateInterval , YarnConfiguration.DefaultTimelineDelegationKeyUpdateInterval); long tokenMaxLifetime = conf.GetLong(YarnConfiguration.TimelineDelegationTokenMaxLifetime , YarnConfiguration.DefaultTimelineDelegationTokenMaxLifetime); long tokenRenewInterval = conf.GetLong(YarnConfiguration.TimelineDelegationTokenRenewInterval , YarnConfiguration.DefaultTimelineDelegationTokenRenewInterval); secretManager = new TimelineDelegationTokenSecretManagerService.TimelineDelegationTokenSecretManager (secretKeyInterval, tokenMaxLifetime, tokenRenewInterval, 3600000, stateStore); base.Init(conf); }