Package org.apache.hadoop.hdfs
Class XAttrHelper
java.lang.Object
org.apache.hadoop.hdfs.XAttrHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XAttrbuildXAttr(String name) BuildXAttrfrom xattr name with prefix.static XAttrbuildXAttr(String name, byte[] value) BuildXAttrfrom name with prefix and value.buildXAttrAsList(String name) Build xattr name with prefix asXAttrlist.buildXAttrMap(List<XAttr> xAttrs) Build xattr map fromXAttrlist, the key is xattr name with prefix, and value is xattr value.buildXAttrs(List<String> names) BuildXAttrlist from xattr name list.static XAttrgetFirstXAttr(List<XAttr> xAttrs) Get first xattr fromXAttrliststatic byte[]getFirstXAttrValue(List<XAttr> xAttrs) Get value of first xattr fromXAttrliststatic StringgetPrefixedName(XAttr xAttr) Get name with prefix fromXAttrstatic StringgetPrefixedName(XAttr.NameSpace ns, String name)
-
Constructor Details
-
XAttrHelper
public XAttrHelper()
-
-
Method Details
-
buildXAttr
BuildXAttrfrom xattr name with prefix. -
buildXAttr
BuildXAttrfrom name with prefix and value. Name can not be null. Value can be null. The name and prefix are validated. Both name and namespace are case sensitive. -
buildXAttrAsList
Build xattr name with prefix asXAttrlist. -
getFirstXAttrValue
Get value of first xattr fromXAttrlist -
getFirstXAttr
Get first xattr fromXAttrlist -
buildXAttrMap
Build xattr map fromXAttrlist, the key is xattr name with prefix, and value is xattr value. -
getPrefixedName
Get name with prefix fromXAttr -
getPrefixedName
-
buildXAttrs
BuildXAttrlist from xattr name list.
-