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

Andrew Wang commented on HDFS-6843:
-----------------------------------

I looked into how we'd do this, and one major issue is Writable compatibility. 
We can't add a new field to FileStatus without breaking compat. ACLs took the 
approach of re-using an unused bit in the permissions short, and we'd have to 
do something similar.

An enum would involve reserving more of our precious unused bits for this 
purpose. Steve, do you mind laying out your usecase in a little more detail? An 
enum by itself isn't very expressive. I figured if users want more information, 
we could add a new API that returns an EncryptedFileStatus with all the gory 
details.

> Create FileStatus.isEncrypted() method
> --------------------------------------
>
>                 Key: HDFS-6843
>                 URL: https://issues.apache.org/jira/browse/HDFS-6843
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode, security
>    Affects Versions: fs-encryption (HADOOP-10150 and HDFS-6134)
>            Reporter: Charles Lamb
>            Assignee: Charles Lamb
>
> FileStatus should have a 'boolean isEncrypted()' method. (it was in the 
> context of discussing with AndreW about FileStatus being a Writable).
> Having this method would allow MR JobSubmitter do the following:
> -----
> BOOLEAN intermediateEncryption = false
> IF jobconf.contains("mr.intermidate.encryption") THEN
>   intermediateEncryption = jobConf.getBoolean("mr.intermidate.encryption")
> ELSE
>   IF (I/O)Format INSTANCEOF File(I/O)Format THEN
>     intermediateEncryption = ANY File(I/O)Format HAS a Path with status 
> isEncrypted()==TRUE
>   FI
>   jobConf.setBoolean("mr.intermidate.encryption", intermediateEncryption)
> FI



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

Reply via email to