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

Haohui Mai commented on HDFS-7529:
----------------------------------

bq. Wouldn't it be better to fail fast in this case? Did you copy the wrong 
code to #ensureKeysAreInitialized?
Likewise, I think that the checks for nullness of provider, keyName, and 
metadata can be removed from #createEncryptionZoneInt, right?

Duplicating the checks is intentional to define well-formed steps as it is 
implied by the name {{ensureKeysAreInitialized()}}.

bq. are now inside the FSN#writeLock(). I suppose that's not the end of the 
world, but every little bit of extra code inside the writeLock() hurts. 

The performance benefit is minimal as {{getPermissionChecker()}} eventually 
synchronized in the {{UserGroupInformation#getCurrentUser()}}. Making it 
consistent with other operations allows the further refactoring.

> Consolidate encryption zone related implementation into a single class
> ----------------------------------------------------------------------
>
>                 Key: HDFS-7529
>                 URL: https://issues.apache.org/jira/browse/HDFS-7529
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-7529.000.patch, HDFS-7529.001.patch
>
>
> This jira proposes to consolidate encryption zone related implementation to a 
> single class.



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

Reply via email to