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

Arun Suresh commented on HADOOP-10862:
--------------------------------------

[~tucu00], apparently, making the {{KMS}} class a Singleton required some extra 
code changes. as per [this 
link|https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2323],
 we would need to Create an instance of an {{Application}} and register the 
Singleton with it.

Also, considering the fact that the {{KMS}} class does'nt really hold state 
(the provider and kmsaudit references are passed to it by {{KMSWebApp}}) I feel 
it is lightweight enough to be instantiated for every call.

> Miscellaneous trivial corrections to KMS classes
> ------------------------------------------------
>
>                 Key: HADOOP-10862
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10862
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 3.0.0
>            Reporter: Alejandro Abdelnur
>            Assignee: Arun Suresh
>         Attachments: HADOOP-10862.1.patch
>
>
> {{KMSRESTConstants.java}}, {{KEY_OP}} should be {{KEYS}} and value should be 
> {{keys}}.
> {{KMS.java}} should be annotated with Jersey {{@Singleton}} to avoid creating 
> an instance on every request, it is thread safe already.
> Make sure all KMS related classes are annotated with private audience.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to