Example usage for org.apache.hadoop.hdfs XAttrHelper buildXAttrAsList

List of usage examples for org.apache.hadoop.hdfs XAttrHelper buildXAttrAsList

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs XAttrHelper buildXAttrAsList.

Prototype

public static List<XAttr> buildXAttrAsList(String name) 

Source Link

Document

Build xattr name with prefix as XAttr list.

Usage

From source file:com.mellanox.r4h.DFSClient.java

License:Apache License

public byte[] getXAttr(String src, String name) throws IOException {
    checkOpen();//from ww w  .  j av a2  s.  c  o  m
    TraceScope scope = getPathTraceScope("getXAttr", src);
    try {
        final List<XAttr> xAttrs = XAttrHelper.buildXAttrAsList(name);
        final List<XAttr> result = namenode.getXAttrs(src, xAttrs);
        return XAttrHelper.getFirstXAttrValue(result);
    } catch (RemoteException re) {
        throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class,
                UnresolvedPathException.class);
    } finally {
        scope.close();
    }
}