YARN-2861. Fixed Timeline DT secret manager to not reuse RM's configs. Contributed by Zhijie Shen
This commit is contained in:
parent
a6efbb21c2
commit
9e33116d1d
@ -371,6 +371,9 @@ Release 2.7.0 - UNRELEASED
|
|||||||
YARN-2637. Fixed max-am-resource-percent calculation in CapacityScheduler
|
YARN-2637. Fixed max-am-resource-percent calculation in CapacityScheduler
|
||||||
when activating applications. (Craig Welch via jianhe)
|
when activating applications. (Craig Welch via jianhe)
|
||||||
|
|
||||||
|
YARN-2861. Fixed Timeline DT secret manager to not reuse RM's configs.
|
||||||
|
(Zhijie Shen via jianhe)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -356,18 +356,18 @@ private static void addDeprecatedKeys() {
|
|||||||
public static final int DEFAULT_RM_SYSTEM_METRICS_PUBLISHER_DISPATCHER_POOL_SIZE =
|
public static final int DEFAULT_RM_SYSTEM_METRICS_PUBLISHER_DISPATCHER_POOL_SIZE =
|
||||||
10;
|
10;
|
||||||
|
|
||||||
//Delegation token related keys
|
//RM delegation token related keys
|
||||||
public static final String DELEGATION_KEY_UPDATE_INTERVAL_KEY =
|
public static final String RM_DELEGATION_KEY_UPDATE_INTERVAL_KEY =
|
||||||
RM_PREFIX + "delegation.key.update-interval";
|
RM_PREFIX + "delegation.key.update-interval";
|
||||||
public static final long DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT =
|
public static final long RM_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT =
|
||||||
24*60*60*1000; // 1 day
|
24*60*60*1000; // 1 day
|
||||||
public static final String DELEGATION_TOKEN_RENEW_INTERVAL_KEY =
|
public static final String RM_DELEGATION_TOKEN_RENEW_INTERVAL_KEY =
|
||||||
RM_PREFIX + "delegation.token.renew-interval";
|
RM_PREFIX + "delegation.token.renew-interval";
|
||||||
public static final long DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT =
|
public static final long RM_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT =
|
||||||
24*60*60*1000; // 1 day
|
24*60*60*1000; // 1 day
|
||||||
public static final String DELEGATION_TOKEN_MAX_LIFETIME_KEY =
|
public static final String RM_DELEGATION_TOKEN_MAX_LIFETIME_KEY =
|
||||||
RM_PREFIX + "delegation.token.max-lifetime";
|
RM_PREFIX + "delegation.token.max-lifetime";
|
||||||
public static final long DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT =
|
public static final long RM_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT =
|
||||||
7*24*60*60*1000; // 7 days
|
7*24*60*60*1000; // 7 days
|
||||||
|
|
||||||
public static final String RECOVERY_ENABLED = RM_PREFIX + "recovery.enabled";
|
public static final String RECOVERY_ENABLED = RM_PREFIX + "recovery.enabled";
|
||||||
@ -1382,6 +1382,20 @@ private static void addDeprecatedKeys() {
|
|||||||
public static final String TIMELINE_SERVICE_LEVELDB_STATE_STORE_PATH =
|
public static final String TIMELINE_SERVICE_LEVELDB_STATE_STORE_PATH =
|
||||||
TIMELINE_SERVICE_LEVELDB_STATE_STORE_PREFIX + "path";
|
TIMELINE_SERVICE_LEVELDB_STATE_STORE_PREFIX + "path";
|
||||||
|
|
||||||
|
// Timeline delegation token related keys
|
||||||
|
public static final String TIMELINE_DELEGATION_KEY_UPDATE_INTERVAL =
|
||||||
|
TIMELINE_SERVICE_PREFIX + "delegation.key.update-interval";
|
||||||
|
public static final long DEFAULT_TIMELINE_DELEGATION_KEY_UPDATE_INTERVAL =
|
||||||
|
24*60*60*1000; // 1 day
|
||||||
|
public static final String TIMELINE_DELEGATION_TOKEN_RENEW_INTERVAL =
|
||||||
|
TIMELINE_SERVICE_PREFIX + "delegation.token.renew-interval";
|
||||||
|
public static final long DEFAULT_TIMELINE_DELEGATION_TOKEN_RENEW_INTERVAL =
|
||||||
|
24*60*60*1000; // 1 day
|
||||||
|
public static final String TIMELINE_DELEGATION_TOKEN_MAX_LIFETIME =
|
||||||
|
TIMELINE_SERVICE_PREFIX + "delegation.token.max-lifetime";
|
||||||
|
public static final long DEFAULT_TIMELINE_DELEGATION_TOKEN_MAX_LIFETIME =
|
||||||
|
7*24*60*60*1000; // 7 days
|
||||||
|
|
||||||
// ///////////////////////////////
|
// ///////////////////////////////
|
||||||
// Shared Cache Configs
|
// Shared Cache Configs
|
||||||
// ///////////////////////////////
|
// ///////////////////////////////
|
||||||
|
@ -60,14 +60,14 @@ protected void serviceInit(Configuration conf) throws Exception {
|
|||||||
}
|
}
|
||||||
|
|
||||||
long secretKeyInterval =
|
long secretKeyInterval =
|
||||||
conf.getLong(YarnConfiguration.DELEGATION_KEY_UPDATE_INTERVAL_KEY,
|
conf.getLong(YarnConfiguration.TIMELINE_DELEGATION_KEY_UPDATE_INTERVAL,
|
||||||
YarnConfiguration.DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT);
|
YarnConfiguration.DEFAULT_TIMELINE_DELEGATION_KEY_UPDATE_INTERVAL);
|
||||||
long tokenMaxLifetime =
|
long tokenMaxLifetime =
|
||||||
conf.getLong(YarnConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_KEY,
|
conf.getLong(YarnConfiguration.TIMELINE_DELEGATION_TOKEN_MAX_LIFETIME,
|
||||||
YarnConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT);
|
YarnConfiguration.DEFAULT_TIMELINE_DELEGATION_TOKEN_MAX_LIFETIME);
|
||||||
long tokenRenewInterval =
|
long tokenRenewInterval =
|
||||||
conf.getLong(YarnConfiguration.DELEGATION_TOKEN_RENEW_INTERVAL_KEY,
|
conf.getLong(YarnConfiguration.TIMELINE_DELEGATION_TOKEN_RENEW_INTERVAL,
|
||||||
YarnConfiguration.DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT);
|
YarnConfiguration.DEFAULT_TIMELINE_DELEGATION_TOKEN_RENEW_INTERVAL);
|
||||||
secretManager = new TimelineDelegationTokenSecretManager(secretKeyInterval,
|
secretManager = new TimelineDelegationTokenSecretManager(secretKeyInterval,
|
||||||
tokenMaxLifetime, tokenRenewInterval, 3600000, stateStore);
|
tokenMaxLifetime, tokenRenewInterval, 3600000, stateStore);
|
||||||
super.init(conf);
|
super.init(conf);
|
||||||
|
@ -127,14 +127,14 @@ protected ClientToAMTokenSecretManagerInRM createClientToAMTokenSecretManager()
|
|||||||
protected RMDelegationTokenSecretManager createRMDelegationTokenSecretManager(
|
protected RMDelegationTokenSecretManager createRMDelegationTokenSecretManager(
|
||||||
Configuration conf, RMContext rmContext) {
|
Configuration conf, RMContext rmContext) {
|
||||||
long secretKeyInterval =
|
long secretKeyInterval =
|
||||||
conf.getLong(YarnConfiguration.DELEGATION_KEY_UPDATE_INTERVAL_KEY,
|
conf.getLong(YarnConfiguration.RM_DELEGATION_KEY_UPDATE_INTERVAL_KEY,
|
||||||
YarnConfiguration.DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT);
|
YarnConfiguration.RM_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT);
|
||||||
long tokenMaxLifetime =
|
long tokenMaxLifetime =
|
||||||
conf.getLong(YarnConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_KEY,
|
conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_KEY,
|
||||||
YarnConfiguration.DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT);
|
YarnConfiguration.RM_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT);
|
||||||
long tokenRenewInterval =
|
long tokenRenewInterval =
|
||||||
conf.getLong(YarnConfiguration.DELEGATION_TOKEN_RENEW_INTERVAL_KEY,
|
conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_KEY,
|
||||||
YarnConfiguration.DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT);
|
YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT);
|
||||||
|
|
||||||
return new RMDelegationTokenSecretManager(secretKeyInterval,
|
return new RMDelegationTokenSecretManager(secretKeyInterval,
|
||||||
tokenMaxLifetime, tokenRenewInterval, 3600000, rmContext);
|
tokenMaxLifetime, tokenRenewInterval, 3600000, rmContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user