pan3793 commented on code in PR #8688:
URL: https://github.com/apache/hadoop/pull/8688#discussion_r4692282800


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java:
##########
@@ -96,6 +98,13 @@ public abstract class 
ZKDelegationTokenSecretManager<TokenIdent extends Abstract
   public static final String ZK_DTSM_TOKEN_WATCHER_ENABLED = ZK_CONF_PREFIX
       + "token.watcher.enabled";
   public static final boolean ZK_DTSM_TOKEN_WATCHER_ENABLED_DEFAULT = true;
+  /**
+   * Bound on the wait for the initial load, per cache (keys, then tokens);
+   * 0 waits indefinitely.
+   */
+  public static final String ZK_DTSM_ZK_CACHE_INIT_TIMEOUT = ZK_CONF_PREFIX
+      + "zkCacheInitTimeout";
+  public static final long ZK_DTSM_ZK_CACHE_INIT_TIMEOUT_DEFAULT = 0;

Review Comment:
   Changed the default to 10 minutes in 0524b56; `0` stays as the explicit 
opt-in for no limit. Basis: HDFS-15383 reports 10 minutes to load 1M tokens 
from ZK into Router memory, and HADOOP-13487 reports about a minute for 100K 
tokens with `PathChildrenCache`. Both loads read one token at a time, while 
`CuratorCache` reads in parallel, so 10 minutes should cover 1M tokens. Thanks 
@cxzl25 for the `BUILD_INITIAL_CACHE` context.



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