HDDS-9943. TokenRenewer should close OzoneClient after use #5809
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Ozone's
TokenRenewer
implementations do not closeOzoneClient
after use.Both O3FS and OFS define their own
TokenRenewer
implementation.Hadoop finds implementations via
ServiceLoader
, and uses the first one that handles the kind of token being used:https://github.com/apache/hadoop/blob/7db9895000860605a66dd6403005b0c61a6ed744/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/Token.java#L454-L470
The two implementations are the same (not FileSystem-specific), kind is the same for both, so we can remove the duplicate one.
https://issues.apache.org/jira/browse/HDDS-9943
How was this patch tested?
Ran
ozonesecure-mr/test.sh
, checked OM audit log for delegation token operations:CI:
https://github.com/adoroszlai/ozone/actions/runs/7237484751