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

Rushabh S Shah commented on HADOOP-15344:
-----------------------------------------

Now I am thinking whether we should do this change.
{{keyProvider#close}} is getting called from {{KMSTokenRenewer#close}}.

{code:java}
// Some comments here
  public long renew(Token<?> token, Configuration conf) throws IOException {
{
         ...
         ...
         return ((KeyProviderDelegationTokenExtension.DelegationTokenExtension)
          keyProvider).renewDelegationToken(token);
    } finally {
      if (keyProvider != null) {
        keyProvider.close();
      }
    }
}
{code}
 Lets assume  the {{keyProvider}} object is a {{LoadBalancingKMSCP}} comprising 
of 2 {{KMSCP}} and one {{KMSClientProvider}} is having problems while closing.
Since there are retries inside {{LoadBalancingKMSCP#doOp}}, 
{{keyProvider#renewDelegationToken(token)}} will retry after encountering bad 
{{KMSCP}} and it succeeds on second KMSCP but {{renew}} will throw an Exception 
in finally block which will fail the renew operation.
Hope it makes sense.
Let me know if I missed anything or if my analysis is incorrect.

> LoadBalancingKMSClientProvider#close should not swallow exceptions
> ------------------------------------------------------------------
>
>                 Key: HADOOP-15344
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15344
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: kms
>            Reporter: Xiao Chen
>            Assignee: fang zhenyi
>            Priority: Minor
>         Attachments: HADOOP-15344.001.patch
>
>
> As [~shahrs87]'s comment on HADOOP-14445 says:
> {quote}
> LoadBalancingKMSCP never throws IOException back. It just swallows all the 
> IOException and just logs it.
> ...
> Maybe we might want to return MultipleIOException from 
> LoadBalancingKMSCP#close. 
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to