[
https://issues.apache.org/jira/browse/YARN-11253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17585039#comment-17585039
]
ASF GitHub Bot commented on YARN-11253:
---------------------------------------
slfan1989 commented on code in PR #4751:
URL: https://github.com/apache/hadoop/pull/4751#discussion_r955449892
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml:
##########
@@ -1077,6 +1077,14 @@
<value>86400000</value>
</property>
+ <property>
+ <description>
+ RM delegation token remove-scan interval in ms
Review Comment:
Thanks for your suggestion, I will fix it.
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMSecretManagerService.java:
##########
@@ -135,9 +136,13 @@ protected RMDelegationTokenSecretManager
createRMDelegationTokenSecretManager(
long tokenRenewInterval =
conf.getLong(YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_KEY,
YarnConfiguration.RM_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT);
+ long removeScanInterval =
+
conf.getTimeDuration(YarnConfiguration.RM_DELEGATION_TOKEN_REMOVE_SCAN_INTERVAL_KEY,
+ YarnConfiguration.RM_DELEGATION_TOKEN_REMOVE_SCAN_INTERVAL_DEFAULT,
+ TimeUnit.MILLISECONDS);
Review Comment:
I will fix it.
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestClientRMTokens.java:
##########
@@ -124,9 +125,13 @@ public void testDelegationToken() throws Exception {
long initialInterval = 10000l;
long maxLifetime= 20000l;
long renewInterval = 10000l;
+ long delegationTokenRemoverScanInterval =
+
conf.getTimeDuration(YarnConfiguration.RM_DELEGATION_TOKEN_REMOVE_SCAN_INTERVAL_KEY,
+ YarnConfiguration.RM_DELEGATION_TOKEN_REMOVE_SCAN_INTERVAL_DEFAULT,
+ TimeUnit.MILLISECONDS);
Review Comment:
I will fix it.
> Add Configuration to delegationToken RemoverScanInterval
> --------------------------------------------------------
>
> Key: YARN-11253
> URL: https://issues.apache.org/jira/browse/YARN-11253
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: resourcemanager
> Affects Versions: 3.4.0, 3.3.4
> Reporter: fanshilun
> Assignee: fanshilun
> Priority: Major
> Labels: pull-request-available
>
> When reading the code, I found the case of hard coding, I think the
> parameters should be abstracted into the configuration.
> org.apache.hadoop.yarn.server.resourcemanager.RMSecretManagerService#
> createRMDelegationTokenSecretManager
> {code:java}
> protected RMDelegationTokenSecretManager
> createRMDelegationTokenSecretManager(Configuration conf, RMContext rmContext)
> {
> // ..... 3600000 This hard code should be extracted
> return new RMDelegationTokenSecretManager(secretKeyInterval,
> tokenMaxLifetime, tokenRenewInterval, 3600000, rmContext);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]