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

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

Introduction

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

Prototype

public static XAttr buildXAttr(String name, byte[] value) 

Source Link

Document

Build XAttr from name with prefix and value.

Usage

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

License:Apache License

public void setXAttr(String src, String name, byte[] value, EnumSet<XAttrSetFlag> flag) throws IOException {
    checkOpen();//  ww w .  j av a 2s . c  o  m
    TraceScope scope = getPathTraceScope("setXAttr", src);
    try {
        namenode.setXAttr(src, XAttrHelper.buildXAttr(name, value), flag);
    } catch (RemoteException re) {
        throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class,
                NSQuotaExceededException.class, SafeModeException.class, SnapshotAccessControlException.class,
                UnresolvedPathException.class);
    } finally {
        scope.close();
    }
}