Преглед изворни кода

YARN-3587. Fix the javadoc of DelegationTokenSecretManager in yarn, etc. projects. Contributed by Gabor Liptak.
(cherry picked from commit 7e543c27fa2881aa65967be384a6203bd5b2304f)

Junping Du пре 10 година
родитељ
комит
a1a7deebf8

+ 11 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java

@@ -99,6 +99,17 @@ extends AbstractDelegationTokenIdentifier>
    */
   protected Object noInterruptsLock = new Object();
 
+  /**
+   * Create a secret manager
+   * @param delegationKeyUpdateInterval the number of milliseconds for rolling
+   *        new secret keys.
+   * @param delegationTokenMaxLifetime the maximum lifetime of the delegation
+   *        tokens in milliseconds
+   * @param delegationTokenRenewInterval how often the tokens must be renewed
+   *        in milliseconds
+   * @param delegationTokenRemoverScanInterval how often the tokens are scanned
+   *        for expired tokens in milliseconds
+   */
   public AbstractDelegationTokenSecretManager(long delegationKeyUpdateInterval,
       long delegationTokenMaxLifetime, long delegationTokenRenewInterval,
       long delegationTokenRemoverScanInterval) {

+ 5 - 4
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/delegation/DelegationTokenSecretManager.java

@@ -79,13 +79,14 @@ public class DelegationTokenSecretManager
 
   /**
    * Create a secret manager
-   * @param delegationKeyUpdateInterval the number of seconds for rolling new
-   *        secret keys.
+   * @param delegationKeyUpdateInterval the number of milliseconds for rolling
+   *        new secret keys.
    * @param delegationTokenMaxLifetime the maximum lifetime of the delegation
-   *        tokens
+   *        tokens in milliseconds
    * @param delegationTokenRenewInterval how often the tokens must be renewed
+   *        in milliseconds
    * @param delegationTokenRemoverScanInterval how often the tokens are scanned
-   *        for expired tokens
+   *        for expired tokens in milliseconds
    * @param storeTokenTrackingId whether to store the token's tracking id
    */
   public DelegationTokenSecretManager(long delegationKeyUpdateInterval,

+ 5 - 4
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/security/token/delegation/DelegationTokenSecretManager.java

@@ -34,13 +34,14 @@ public class DelegationTokenSecretManager
 
   /**
    * Create a secret manager
-   * @param delegationKeyUpdateInterval the number of seconds for rolling new
-   *        secret keys.
+   * @param delegationKeyUpdateInterval the number of milliseconds for rolling
+   *        new secret keys.
    * @param delegationTokenMaxLifetime the maximum lifetime of the delegation
-   *        tokens
+   *        tokens in milliseconds
    * @param delegationTokenRenewInterval how often the tokens must be renewed
+   *        in milliseconds
    * @param delegationTokenRemoverScanInterval how often the tokens are scanned
-   *        for expired tokens
+   *        for expired tokens in milliseconds
    */
   public DelegationTokenSecretManager(long delegationKeyUpdateInterval,
                                       long delegationTokenMaxLifetime, 

+ 5 - 4
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JHSDelegationTokenSecretManager.java

@@ -47,13 +47,14 @@ public class JHSDelegationTokenSecretManager
 
   /**
    * Create a secret manager
-   * @param delegationKeyUpdateInterval the number of seconds for rolling new
-   *        secret keys.
+   * @param delegationKeyUpdateInterval the number of milliseconds for rolling
+   *        new secret keys.
    * @param delegationTokenMaxLifetime the maximum lifetime of the delegation
-   *        tokens
+   *        tokens in milliseconds
    * @param delegationTokenRenewInterval how often the tokens must be renewed
+   *        in milliseconds
    * @param delegationTokenRemoverScanInterval how often the tokens are scanned
-   *        for expired tokens
+   *        for expired tokens in milliseconds
    * @param store history server state store for persisting state
    */
   public JHSDelegationTokenSecretManager(long delegationKeyUpdateInterval,

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -179,6 +179,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3395. FairScheduler: Trim whitespaces when using username for 
     queuename. (Zhihai Xu via kasha)
 
+    YARN-3587. Fix the javadoc of DelegationTokenSecretManager in yarn, etc. 
+    projects. (Gabor Liptak via junping_du)
+
   OPTIMIZATIONS
 
     YARN-3339. TestDockerContainerExecutor should pull a single image and not

+ 8 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/security/TimelineDelegationTokenSecretManagerService.java

@@ -125,11 +125,15 @@ public class TimelineDelegationTokenSecretManagerService extends
 
     /**
      * Create a timeline secret manager
-     *
-     * @param delegationKeyUpdateInterval the number of seconds for rolling new secret keys.
-     * @param delegationTokenMaxLifetime the maximum lifetime of the delegation tokens
+     * @param delegationKeyUpdateInterval the number of milliseconds for rolling
+     *        new secret keys.
+     * @param delegationTokenMaxLifetime the maximum lifetime of the delegation
+     *        tokens in milliseconds
      * @param delegationTokenRenewInterval how often the tokens must be renewed
-     * @param delegationTokenRemoverScanInterval how often the tokens are scanned for expired tokens
+     *        in milliseconds
+     * @param delegationTokenRemoverScanInterval how often the tokens are
+     *        scanned for expired tokens in milliseconds
+     * @param stateStore timeline service state store
      */
     public TimelineDelegationTokenSecretManager(
         long delegationKeyUpdateInterval,

+ 6 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMDelegationTokenSecretManager.java

@@ -56,13 +56,15 @@ public class RMDelegationTokenSecretManager extends
 
   /**
    * Create a secret manager
-   * @param delegationKeyUpdateInterval the number of seconds for rolling new
-   *        secret keys.
+   * @param delegationKeyUpdateInterval the number of milliseconds for rolling
+   *        new secret keys.
    * @param delegationTokenMaxLifetime the maximum lifetime of the delegation
-   *        tokens
+   *        tokens in milliseconds
    * @param delegationTokenRenewInterval how often the tokens must be renewed
+   *        in milliseconds
    * @param delegationTokenRemoverScanInterval how often the tokens are scanned
-   *        for expired tokens
+   *        for expired tokens in milliseconds
+   * @param rmContext current context of the ResourceManager
    */
   public RMDelegationTokenSecretManager(long delegationKeyUpdateInterval,
                                       long delegationTokenMaxLifetime,