Example usage for org.apache.hadoop.hdfs.web.resources XAttrValueParam XAttrValueParam

List of usage examples for org.apache.hadoop.hdfs.web.resources XAttrValueParam XAttrValueParam

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.web.resources XAttrValueParam XAttrValueParam.

Prototype

public XAttrValueParam(final String str) 

Source Link

Usage

From source file:com.bigstep.datalake.DLFileSystem.java

License:Apache License

@Override
public void setXAttr(Path p, String name, byte[] value, EnumSet<XAttrSetFlag> flag) throws IOException {
    statistics.incrementWriteOps(1);//from ww  w  .  jav a 2s  .c o m
    final HttpOpParam.Op op = PutOpParam.Op.SETXATTR;
    if (value != null) {
        new FsPathRunner(op, p, new XAttrNameParam(name),
                new XAttrValueParam(XAttrCodec.encodeValue(value, XAttrCodec.HEX)), new XAttrSetFlagParam(flag))
                        .run();
    } else {
        new FsPathRunner(op, p, new XAttrNameParam(name), new XAttrSetFlagParam(flag)).run();
    }
}