-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-17835. Use CuratorCache implementation instead of PathChildrenCache / TreeCache #3266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…Cache / TreeCache
🎊 +1 overall
This message was automatically generated. |
@aajisaka @eolivelli Could you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch looks good to me.
@Randgalt do you have time to review? I am not expert of the migration out from TreeCache
...rc/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java
Show resolved
Hide resolved
@@ -363,105 +357,122 @@ public void startThreads() throws IOException { | |||
throw new RuntimeException("Could not create ZK paths"); | |||
} | |||
try { | |||
keyCache = new PathChildrenCache(zkClient, ZK_DTSM_MASTER_KEY_ROOT, true); | |||
keyCache = CuratorCache.bridgeBuilder(zkClient, ZK_DTSM_MASTER_KEY_ROOT) | |||
.build(); | |||
if (keyCache != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyCache
will never be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this was not applicable even before with PathChildrenCache.
} | ||
if (isTokenWatcherEnabled) { | ||
LOG.info("TokenCache is enabled"); | ||
try { | ||
tokenCache = new PathChildrenCache(zkClient, ZK_DTSM_TOKENS_ROOT, true); | ||
tokenCache = CuratorCache.bridgeBuilder(zkClient, ZK_DTSM_TOKENS_ROOT) | ||
.build(); | ||
if (tokenCache != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tokenCache
will never be null
} | ||
}, listenerThreadPool); | ||
CuratorCacheListener keyCacheListener = CuratorCacheListener.builder() | ||
.forCreates(childData -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: there is a forCreatesAndChanges()
} | ||
}, listenerThreadPool); | ||
CuratorCacheListener tokenCacheListener = CuratorCacheListener.builder() | ||
.forCreates(childData -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: there is a forCreatesAndChanges()
public ListenerHandle registerPathListener(final PathListener listener) { | ||
|
||
CuratorCacheListener cacheListener = CuratorCacheListener.builder() | ||
.forCreates(childData -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: there is a forCreatesAndChanges()
@Randgalt Thanks for the review. Addressed all comments. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
Thanks for the reviews. @aajisaka we have @eolivelli's +1 for this PR after latest revision. |
Thank you @virajjasani for your contribution and thanks @eolivelli and @Randgalt for your review. |
…Cache / TreeCache (apache#3266) Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
…Cache / TreeCache (apache#3266) Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
…Cache / TreeCache (apache#3266) Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
* HDFS-15383. RBF: Add support for router delegation token without watch (#2047) Improving router's performance for delegation tokens related operations. It achieves the goal by removing watchers from router on tokens since based on our experience. The huge number of watches inside Zookeeper is degrading Zookeeper's performance pretty hard. The current limit is about 1.2-1.5 million. * HADOOP-17835. Use CuratorCache implementation instead of PathChildrenCache / TreeCache (#3266) Signed-off-by: Akira Ajisaka <aajisaka@apache.org> Co-authored-by: lfengnan <lfengnan@uber.com> Co-authored-by: Viraj Jasani <vjasani@apache.org> Co-authored-by: Melissa You <myou@myou-mn1.linkedin.biz>
…che#5112) (apache#26) * HDFS-15383. RBF: Add support for router delegation token without watch (apache#2047) Improving router's performance for delegation tokens related operations. It achieves the goal by removing watchers from router on tokens since based on our experience. The huge number of watches inside Zookeeper is degrading Zookeeper's performance pretty hard. The current limit is about 1.2-1.5 million. * HADOOP-17835. Use CuratorCache implementation instead of PathChildrenCache / TreeCache (apache#3266) Signed-off-by: Akira Ajisaka <aajisaka@apache.org> Co-authored-by: lfengnan <lfengnan@uber.com> Co-authored-by: Viraj Jasani <vjasani@apache.org> Co-authored-by: Melissa You <myou@linkedin.com> ACLOVERRIDE
No description provided.