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

Colin Patrick McCabe commented on HDFS-6516:
--------------------------------------------

{code}
+  private final Map<INode, EncryptionZone> encryptionZones;
{code}

Can we make this a {{Map<Long, EncryptionZone>}}?  In other words, just do it 
by inode ID.  This is how we do snapshots and it's a lot clearer (Long is 
immutable, and it's obvious how you compare them.)

{code}
+  private final Map<INode, String> pendingEncryptionZones;
+  private final Map<INode, EncryptionZone> encryptionZones;
{code}

We shouldn't need two maps, right?  Now that we're inode-based, one is 
enough... we don't need to carry around pathname baggage.

I think EncryptionZone.java will have to change here as well.  It's not nice to 
use pathnames there either.  I think it would be good to split the public API 
(returned from calls such as listEncryptionZones) from the private API, used to 
store internal information.  The private API shouldn't need to store paths, 
just inode IDs (or perhaps references to inode objects?)

Since we're doing the inode-ification in this JIRA, the JIRA name should 
probably reflect that?  I think the actual persistence-related content of this 
JIRA is minimal (we're just re-using the xattr storage).  It's more about how 
we store stuff conceptually.

> Persist and Restore the List of Encryption Zones
> ------------------------------------------------
>
>                 Key: HDFS-6516
>                 URL: https://issues.apache.org/jira/browse/HDFS-6516
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: security
>            Reporter: Charles Lamb
>            Assignee: Charles Lamb
>         Attachments: HDFS-6516.001.patch, HDFS-6516.002.patch
>
>
> The list Encryption Zones command (CLI) and backend implementation 
> (FSNamesystem) needs to be implemented. As part of this, the tests in 
> TestEncryptionZonesAPI should be updated to use that to validate the results 
> of the various CreateEZ and DeleteEZ tests.



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

Reply via email to