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

Alejandro Abdelnur commented on HADOOP-10720:
---------------------------------------------

I've done a quick scan to the patch, it is in the right direction, a few things 
I've noticed:

* KMSClientProvider.java imports, your IDE is rearranging them making false 
changes
* KMSClientProvider.java, keyQueueFiller runnable, the for loop should clone 
the {{keyQueues.entry()}}, even if the Map is a concurrent one.
* KMSClientProvider.java, using a concurrent Map and the {{putIfAbsent()}} 
method results a {{LinkedBlockingQueue}} instance being created on every call. 
Instead I would use a Guava Cache, and the benefit is that you get eviction 
policies for free (we should discard a queue is not use for X amount of time).
* KMS sever side, I think on the server side we should do identical caching to 
minimize the REST API calls time. It should be possible to have a common class 
with the caching logic and watermark triggers to be used on both sides.

> KMS: Implement generateEncryptedKey and decryptEncryptedKey in the REST API
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-10720
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10720
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: security
>    Affects Versions: 3.0.0
>            Reporter: Alejandro Abdelnur
>            Assignee: Arun Suresh
>         Attachments: COMBO.patch, COMBO.patch, COMBO.patch, COMBO.patch, 
> COMBO.patch, HADOOP-10720.1.patch, HADOOP-10720.patch, HADOOP-10720.patch, 
> HADOOP-10720.patch, HADOOP-10720.patch, HADOOP-10720.patch
>
>
> KMS client/server should implement support for generating encrypted keys and 
> decrypting them via the REST API being introduced by HADOOP-10719.



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

Reply via email to