You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "zhihai xu (JIRA)" <ji...@apache.org> on 2015/01/28 19:32:35 UTC

[jira] [Updated] (YARN-3106) The message in IllegalArgumentException gave wrong information in NMTokenSecretManagerInRM.java and RMContainerTokenSecretManager.java

     [ https://issues.apache.org/jira/browse/YARN-3106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

zhihai xu updated YARN-3106:
----------------------------
    Attachment: YARN-3106.000.patch

> The message in IllegalArgumentException gave wrong information in NMTokenSecretManagerInRM.java and RMContainerTokenSecretManager.java
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3106
>                 URL: https://issues.apache.org/jira/browse/YARN-3106
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>            Priority: Minor
>         Attachments: YARN-3106.000.patch
>
>
> The message in IllegalArgumentException gave wrong information in NMTokenSecretManagerInRM.java and RMContainerTokenSecretManager.java.
> We saw this error message:
> {code}
> Error starting ResourceManager
> java.lang.IllegalArgumentException: yarn.resourcemanager.nm-tokens.master-key-rolling-interval-secs should be more than 2 X yarn.nm.liveness-monitor.expiry-interval-ms
> {code}
> After I checked the source code, I find this error message misleading.
> The following is code from NMTokenSecretManagerInRM.java
> {code}
>     rollingInterval = this.conf.getLong(        YarnConfiguration.RM_NMTOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS,    YarnConfiguration.DEFAULT_RM_NMTOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS)  * 1000;
>     this.activationDelay =        (long) (conf.getLong(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS,
>             YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS) * 1.5);
>     LOG.info("NMTokenKeyRollingInterval: " + this.rollingInterval
>         + "ms and NMTokenKeyActivationDelay: " + this.activationDelay
>         + "ms");
>     if (rollingInterval <= activationDelay * 2) {
>       throw new IllegalArgumentException(         YarnConfiguration.RM_NMTOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS              + " should be more than 2 X "
>               + YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS);
>     }
> {code}
> It should be 3 X not 2 X.
> Same error also happened in RMContainerTokenSecretManager.java.
> {code}
>    this.rollingInterval = conf.getLong(   YarnConfiguration.RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS,       YarnConfiguration.DEFAULT_RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS) * 1000;
>     this.activationDelay =
>         (long) (conf.getLong(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS,
>             YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS) * 1.5);
>     LOG.info("ContainerTokenKeyRollingInterval: " + this.rollingInterval
>         + "ms and ContainerTokenKeyActivationDelay: " + this.activationDelay
>         + "ms");
>     if (rollingInterval <= activationDelay * 2) {
>       throw new IllegalArgumentException(      YarnConfiguration.RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS              + " should be more than 2 X "            +YarnConfiguration.RM_CONTAINER_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)