[ 
https://issues.apache.org/jira/browse/HADOOP-18397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17577581#comment-17577581
 ] 

ASF GitHub Bot commented on HADOOP-18397:
-----------------------------------------

virajjasani commented on PR #4722:
URL: https://github.com/apache/hadoop/pull/4722#issuecomment-1209772369

   > back when we did that the sts client shutdown just threw 
UnsupportedOperationException. is that no longer the case? if so, we should 
stop swallowing it in our STSClient
   
   That is true, we no longer need to catch `UnsupportedOperationException`. 
Based on the implementations that implement `AWSSecurityTokenService`, it seems 
that this Exception is now only thrown by `AbstractAWSSecurityTokenService`, 
which we don't use anyways.
   
   `AbstractAWSSecurityTokenService`:
   ```
       @Override
       public void shutdown() {
           throw new java.lang.UnsupportedOperationException();
       }
   
   ```
   
   `AWSSecurityTokenServiceAsyncClient`:
   ```
       @Override
       public void shutdown() {
           super.shutdown();
           executorService.shutdownNow();
       }
   
   ```
   
   `AWSSecurityTokenServiceClient`:
   ```
       @Override
       public void shutdown() {
           super.shutdown();
       }
   
   ```
   
   We are good here. Just ran all the tests against new commit. Sharing the 
test results in the next comment.




> Shutdown AWSSecurityTokenService when it's resources are no longer in use
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-18397
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18397
>             Project: Hadoop Common
>          Issue Type: Task
>          Components: fs/s3
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>
> AWSSecurityTokenService resources can be released whenever they are no longer 
> in use. The documentation of AWSSecurityTokenService#shutdown says while it 
> is not important for client to compulsorily shutdown the token service, 
> client can definitely perform early release whenever client no longer 
> requires token service resources. We achieve this by making STSClient 
> closable, so we can certainly utilize it in all places where it's suitable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to