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

Charles Lamb updated HDFS-6473:
-------------------------------

    Attachment: HDFS-6473.3.patch

Thanks for the review Andrew.

bq.    Why listEZ and showEZ? Seems redundant, and are named very similarly.

agree. It's now List<EncryptionZone> listEncryptionZones. Depending on the 
caller's privs, we either fill in the keyId or not, and return all or a subset.

bq.    Maybe call it "encryption.proto" rather than "EncryptionZone.proto", 
since we might be adding ops not directly related to a Zone at some point.

done.

bq.    CreateEZRequestProto field numbers go 1 then 3, rather than 1 2.

Ooops. Good catch. That was an artifact from when there was a mask field.

bq.    Seems like we should have a protobuf for key and IV, since it's also in 
the LocatedBlocksProto.

I was a little confused by this, but I think that what you mean is that an 
EncryptionZone could be used to hold a key and IV. But we'll never show an IV 
to someone calling ListEncryptionZones (since an IV is per-file, not per-EZ). 
So I didn't make this change.

bq.    DFSClient, some of the unwrapped exceptions aren't actually thrown

I fixed this up.

bq.    HdfsAdmin, let's work on specifying less generic exception types. 
AccessControlException and FileNotFoundException should probably be mentioned. 
Do we want a new UnknownKeyException or similar if it's not present in the 
KeyProvider?

I added ACLE and FNFE. The KeyProvider API doesn't actually throw anything more 
than IOException so it doesn't feel right for us to throw something more 
specific here. I did make a note in the code that I'm working on for a future 
jira which implements createEZ.

bq.    I don't consider "encryption zone" a proper noun, let's lower case it. 
Same for "extended attribute".

Done.

bq.    s/Key Management System/KeyProvider/, same for KMS. Side note, it's also 
Server not System.

Done.

bq.    Should use self-closing <p/> tags.

Done.

bq.    EncryptionZone, needs class javadoc, let's also use HashCodeBuilder and 
EqualsBuilder from Apache Commons or Guava. This is stylistic, but a factory 
method might be better than a builder, since this is a really simple class.

Done. I just added a ctor instead of the builder.

bq.    I'd prefer just to leave out the FSNamesystem and new test, not much 
value in the current state. Can save em for later.

I left minimal stub code in FSNamesystem and removed the test from the patch.

> Protocol and API for Encryption Zones
> -------------------------------------
>
>                 Key: HDFS-6473
>                 URL: https://issues.apache.org/jira/browse/HDFS-6473
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: security
>            Reporter: Charles Lamb
>            Assignee: Charles Lamb
>         Attachments: HDFS-6473.1.patch, HDFS-6473.2.patch, HDFS-6473.3.patch
>
>
> Create the client/NN protocol for encryption zones.



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

Reply via email to