[
https://issues.apache.org/jira/browse/HDDS-9943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-9943:
-----------------------------------
Fix Version/s: 1.4.1
> TokenRenewer should close OzoneClient after use
> -----------------------------------------------
>
> Key: HDDS-9943
> URL: https://issues.apache.org/jira/browse/HDDS-9943
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Filesystem
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.5.0, 1.4.1
>
>
> Ozone's {{TokenRenewer}} implementations do not close {{OzoneClient}} 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:
> {code:title=https://github.com/apache/hadoop/blob/7db9895000860605a66dd6403005b0c61a6ed744/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/Token.java#L454-L470}
> private static ServiceLoader<TokenRenewer> renewers =
> ServiceLoader.load(TokenRenewer.class);
> private synchronized TokenRenewer getRenewer() throws IOException {
> if (renewer != null) {
> return renewer;
> }
> renewer = TRIVIAL_RENEWER;
> synchronized (renewers) {
> Iterator<TokenRenewer> it = renewers.iterator();
> while (it.hasNext()) {
> try {
> TokenRenewer candidate = it.next();
> if (candidate.handleKind(this.kind)) {
> renewer = candidate;
> return renewer;
> }
> {code}
> The two implementations are the same (not FileSystem-specific), kind is the
> same for both, so we can remove the duplicate one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]