Class XAttrStorage
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.XAttrStorage
XAttrStorage is used to read and set xattrs for an inode.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.fs.XAttrreadINodeXAttrByPrefixedName(INode inode, int snapshotId, String prefixedName) Reads the extended attribute of an inode by name with prefix.static List<org.apache.hadoop.fs.XAttr>readINodeXAttrs(INodeAttributes inodeAttr) Reads the existing extended attributes of an inode.static voidupdateINodeXAttrs(INode inode, List<org.apache.hadoop.fs.XAttr> xAttrs, int snapshotId) Update xattrs of inode.
-
Constructor Details
-
XAttrStorage
public XAttrStorage()
-
-
Method Details
-
readINodeXAttrByPrefixedName
public static org.apache.hadoop.fs.XAttr readINodeXAttrByPrefixedName(INode inode, int snapshotId, String prefixedName) Reads the extended attribute of an inode by name with prefix.- Parameters:
inode- INode to readsnapshotId- the snapshotId of the requested pathprefixedName- xAttr name with prefix- Returns:
- the xAttr
-
readINodeXAttrs
Reads the existing extended attributes of an inode.Must be called while holding the FSDirectory read lock.
- Parameters:
inodeAttr- INodeAttributes to read.- Returns:
XAttrlist.
-
updateINodeXAttrs
public static void updateINodeXAttrs(INode inode, List<org.apache.hadoop.fs.XAttr> xAttrs, int snapshotId) throws org.apache.hadoop.hdfs.protocol.QuotaExceededException Update xattrs of inode.Must be called while holding the FSDirectory write lock.
- Parameters:
inode- INode to updatexAttrs- to update xAttrs.snapshotId- id of the latest snapshot of the inode- Throws:
org.apache.hadoop.hdfs.protocol.QuotaExceededException
-