Pigueiras opened a new pull request, #10478:
URL: https://github.com/apache/ozone/pull/10478
## What changes were proposed in this pull request?
HDDS-15522. Make RpcClient close idempotent
Guard RpcClient cleanup so repeated close calls return before releasing
ContainerClientMetrics again. This keeps the metrics acquire/release pairing
per client instance and avoids shutdown warnings when ViewFS or filesystem
cache cleanup closes the same client more than once.
## How was this patch tested?
We have built it and deployed it in our client nodes, and we can't see
anymore the following warning when executing operations in an Ozone viewfs
mount:
```
$ hdfs dfs -ls /ozone
...
26/06/10 10:06:13 WARN util.ShutdownHookManager: ShutdownHook
'ClientFinalizer' failed, java.util.concurrent.ExecutionException:
java.lang.IllegalStateException: This metrics class is not used.
java.util.concurrent.ExecutionException: java.lang.IllegalStateException:
This metrics class is not used.
at
java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at
org.apache.hadoop.util.ShutdownHookManager.executeShutdown(ShutdownHookManager.java:124)
at
org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:95)
Caused by: java.lang.IllegalStateException: This metrics class is not used.
at
org.apache.hadoop.hdds.scm.ContainerClientMetrics.release(ContainerClientMetrics.java:96)
at
org.apache.hadoop.ozone.client.rpc.RpcClient.close(RpcClient.java:1892)
at
org.apache.hadoop.ozone.client.OzoneClient.close(OzoneClient.java:122)
at
org.apache.hadoop.fs.ozone.BasicRootedOzoneClientAdapterImpl.close(BasicRootedOzoneClientAdapterImpl.java:372)
at
org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.close(BasicRootedOzoneFileSystem.java:225)
at
org.apache.hadoop.fs.viewfs.ViewFileSystem$InnerCache.closeAll(ViewFileSystem.java:156)
at
org.apache.hadoop.fs.viewfs.ViewFileSystem.close(ViewFileSystem.java:1936)
at
org.apache.hadoop.fs.FileSystem$Cache.closeAll(FileSystem.java:3816)
at
org.apache.hadoop.fs.FileSystem$Cache$ClientFinalizer.run(FileSystem.java:3833)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
```
--
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]