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

Yi Liu updated HDFS-2006:
-------------------------

    Attachment: xattrs.patch

Dhruba, this JIRA has been sleeping for quite a while, do you mind if I 
reassign it to me to take a stab at it? Attached is a preliminary patch I've 
been working for extended attributes.

XAttrs(Extended attributes) are widely implemented on traditional Operating 
Systems, such as Linux, Windows, Mac OS and so on.  There are more and more 
requirements for HDFS providing feature to store extended attributes for files 
and directories, Hadoop transparent encryption and many upper layer components 
desire this feature.  Main points of the design are as following:

1. XAttrs feature will be implemented based on INode IFeature (HDFS-5284).  
File/directory can have xattr.

2. XAttr is stored in NN memory, including both the name and value. The 
preliminary patch and design doc focus on this, it will be fine for short 
value, even so, it can satisfy many requirements.

3. For xattr with large value, it's not target of this phase. We can consider 
it in next phase, large value is not suitable in NN precious memory, maybe we 
can store it to something persisted elsewhere and have a reference in NN memory.

4. If XAttrs feature is not enabled, no additional memory and disk space is 
required.

5. XAttr is POSIX Extended Attribute model, similar to the one in traditional 
Operating Systems: http://en.wikipedia.org/wiki/Extended_file_attributes, 
http://www.bestbits.at/acl/man/man5/attr.txt. Extended Attribute consists of a 
name and associated data, and 4 namespaces are defined: user, trusted, security 
and system. "setfattr" and "getfattr" will be supported as FsShell commands 
which are same as in Linux.

For more information, please refer to the design doc which will be attached 
later.

> ability to support storing extended attributes per file
> -------------------------------------------------------
>
>                 Key: HDFS-2006
>                 URL: https://issues.apache.org/jira/browse/HDFS-2006
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: xattrs.patch
>
>
> It would be nice if HDFS provides a feature to store extended attributes for 
> files, similar to the one described here: 
> http://en.wikipedia.org/wiki/Extended_file_attributes. 
> The challenge is that it has to be done in such a way that a site not using 
> this feature does not waste precious memory resources in the namenode.



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

Reply via email to