zhangxiping1 commented on code in PR #5921:
URL: https://github.com/apache/hadoop/pull/5921#discussion_r1292902814


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/TestDelegationToken.java:
##########
@@ -376,4 +382,61 @@ public void testDelegationTokenIdentifierToString() throws 
Exception {
         " for SomeUser with renewer JobTracker",
         dtId.toStringStable());
   }
+
+  public static class MyDelegationTokenSecretManager extends
+      AbstractDelegationTokenSecretManager<DelegationTokenIdentifier> {
+    /**
+     * 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 MyDelegationTokenSecretManager(long delegationKeyUpdateInterval,
+        long delegationTokenMaxLifetime, long delegationTokenRenewInterval,
+        long delegationTokenRemoverScanInterval) {
+      super(delegationKeyUpdateInterval,

Review Comment:
   Yes, the ExpiredTokenRemover thread will operate automatically, which is 
selected to be called automatically in the test case to determine if an 
exception has been generated. If an exception has been generated, it indicates 
that it has not been fixed.Any suggestions for improvement?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to