fengnanli commented on a change in pull request #2110:
URL: https://github.com/apache/hadoop/pull/2110#discussion_r451227025



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
##########
@@ -64,7 +69,13 @@ private String formatTokenId(TokenIdent id) {
    */
   protected final Map<TokenIdent, DelegationTokenInformation> currentTokens 
       = new ConcurrentHashMap<>();
-  
+
+  /**
+   * Map of token real owners to its token count. This is used to generate
+   * top users by owned tokens.
+   */
+  protected final Map<String, Long> tokenOwnerStats = new 
ConcurrentHashMap<>();

Review comment:
       It depends on individual secret manager to initialize the 
`currentTokens`. In namenode, it is loading from edit log. In router, it is 
loading from ZK.
   I would have a separate ticket for namenode.




----------------------------------------------------------------
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.

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