Package org.apache.hadoop.fs
Class XAttr
java.lang.Object
org.apache.hadoop.fs.XAttr
XAttr is the POSIX Extended Attribute model similar to that found in
traditional Operating Systems. Extended Attributes consist of one
or more name/value pairs associated with a file or directory. Five
namespaces are defined: user, trusted, security, system and raw.
1) USER namespace attributes may be used by any user to store
arbitrary information. Access permissions in this namespace are
defined by a file directory's permission bits. For sticky directories,
only the owner and privileged user can write attributes.
2) TRUSTED namespace attributes are only visible and accessible to privileged users. This namespace is available from both user space (filesystem API) and fs kernel.
3) SYSTEM namespace attributes are used by the fs kernel to store system objects. This namespace is only available in the fs kernel. It is not visible to users.
4) SECURITY namespace attributes are used by the fs kernel for security features. It is not visible to users.
5) RAW namespace attributes are used for internal system attributes that sometimes need to be exposed. Like SYSTEM namespace attributes they are not visible to the user except when getXAttr/getXAttrs is called on a file or directory in the /.reserved/raw HDFS directory hierarchy. These attributes can only be accessed by the superuser.
2) TRUSTED namespace attributes are only visible and accessible to privileged users. This namespace is available from both user space (filesystem API) and fs kernel.
3) SYSTEM namespace attributes are used by the fs kernel to store system objects. This namespace is only available in the fs kernel. It is not visible to users.
4) SECURITY namespace attributes are used by the fs kernel for security features. It is not visible to users.
5) RAW namespace attributes are used for internal system attributes that sometimes need to be exposed. Like SYSTEM namespace attributes they are not visible to the user except when getXAttr/getXAttrs is called on a file or directory in the /.reserved/raw HDFS directory hierarchy. These attributes can only be accessed by the superuser.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsIgnoreValue(Object obj) Similar toequals(Object), except ignores the XAttr value.getName()byte[]getValue()inthashCode()toString()
-
Method Details
-
getNameSpace
-
getName
-
getValue
public byte[] getValue() -
hashCode
public int hashCode() -
equals
-
equalsIgnoreValue
Similar toequals(Object), except ignores the XAttr value.- Parameters:
obj- to compare equality- Returns:
- if the XAttrs are equal, ignoring the XAttr value
-
toString
-