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

Arun Suresh commented on HADOOP-11161:
--------------------------------------

[~lmccay], thank you for the review and your feedback..
but, I don't think of {{close()}} as a full lifecycle method per se. But yes, I 
do understand your concern about making it clear to the client that once 
closed, it should not be used.. Would having {{KeyProvider}} implement 
{{java.io.Closable}} address your concern ?

bq. If we need to manage internal state of the providers than we need a full 
lifecycle story 
Not really sure I understand why.. consider Streams, the 
ByteArrayInput/OutputStream has a NO-OP close method, while most of the others 
have..  all of them manage some internal state.. without full lifecycle 
methods..


> Expose close method in KeyProvider to give clients of Provider 
> implementations a hook to release resources
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11161
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11161
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Arun Suresh
>            Assignee: Arun Suresh
>         Attachments: HADOOP-11161.1.patch, HADOOP-11161.2.patch, 
> HADOOP-11161.3.patch
>
>
> The {{KMSClientProvider}} class needs to be have a {{close()}} method to 
> shutdown back ground executor threads.
> The {{DFSClient}} creates an instance of a {{KeyProvider}} during 
> initialization. If this KP is a {{KMSClientProvider}}, this needs to be 
> closed to prevent thread leakage



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to