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

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

Introduction

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

Prototype

public XAttrSetFlagParam(final String str) 

Source Link

Document

Constructor.

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  w w  w . j a v  a  2 s  .  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();
    }
}