-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-16518: Add shutdownhook in KeyProviderCache to invalidate cache at jvm shutdown #4100
Conversation
@li-leyang this change is invalidating the singleton cache every time a DFSClient is closed. I thought the intention was to use a shutdown hook to close key provider clients instead? |
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.
Please also rephrase the title of the pull request as we're no longer reacting to DFSClient being closed.
...p-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/KeyProviderCache.java
Outdated
Show resolved
Hide resolved
...p-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/KeyProviderCache.java
Show resolved
Hide resolved
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.
LGTM
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
I commented on the jira, but: I don't understand why this is required. Obviously at jvm shutdown the cache will be discarded. The order of shutdown hooks isn't deterministic, so using this isn't a fix against other shutdown hooks using the cache. Is there some other call to KeyProvider.close() that this should replace? |
Fixes #4100 Signed-off-by: Owen O'Malley <oomalley@linkedin.com>
Fixes #4100 Signed-off-by: Owen O'Malley <oomalley@linkedin.com>
Hi @omalley - it is committed to trunk, branch-3.3, and branch-2.10 without your approval in either JIRA or GitHub PR. Do you have any reason to approve the change? |
Sorry, I meant to also close & comment on the jira. Committing it and referencing this PR, means that I approved it. |
Fixes apache#4100 Signed-off-by: Owen O'Malley <oomalley@linkedin.com>
Fixes apache#4100 Signed-off-by: Owen O'Malley <oomalley@linkedin.com> (cherry picked from commit 4f85c9a)
Description of PR
https://issues.apache.org/jira/browse/HDFS-16518
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?