[ 
https://issues.apache.org/jira/browse/HDFS-9405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiao Chen updated HDFS-9405:
----------------------------
    Attachment: HDFS-9405.05.patch

Thanks for explaining [~liuml07], I misread your previous comment. Agree the 
extra {{spy()}} is not needed. Patch 5 reflects this.

Surprisingly, I discovered another problem in 
{{TestEncryptionZonesWithKMS#testCreateEZPopulatesEDEKCache}} (the case above 
my test case):
In HDFS-7209, we added this test, and method {{ValueQueue#getSize}} for testing 
purpose. The problem is, when we do {{keyQueues.get(keyName).size()}} to verify 
the size, the loading cache itself will always populate the cache because of 
the call to {{get}}. In other words, the test always passes.... I've verified 
that by backing up the change and running the test - it's still green.

So, patch 5 here also changed the {{getSize}} method to check size without 
loading the cache. Verified both tests behave in a fail-before, pass-after 
manner.

> When starting a file, NameNode should generate EDEK in a separate thread
> ------------------------------------------------------------------------
>
>                 Key: HDFS-9405
>                 URL: https://issues.apache.org/jira/browse/HDFS-9405
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: encryption, namenode
>    Affects Versions: 2.7.1
>            Reporter: Zhe Zhang
>            Assignee: Xiao Chen
>         Attachments: HDFS-9405.01.patch, HDFS-9405.02.patch, 
> HDFS-9405.03.patch, HDFS-9405.04.patch, HDFS-9405.05.patch
>
>
> {{generateEncryptedDataEncryptionKey}} involves a non-trivial I/O operation 
> to the key provider, which could be slow or cause timeout. It should be done 
> as a separate thread so as to return a proper error message to the RPC caller.



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

Reply via email to