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

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

Introduction

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

Prototype

public NewLengthParam(final String str) 

Source Link

Document

Constructor.

Usage

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

License:Apache License

@Override
public boolean truncate(Path f, long newLength) throws IOException {
    statistics.incrementWriteOps(1);/*from  w w  w  .j  a  va 2 s .  co  m*/

    final HttpOpParam.Op op = PostOpParam.Op.TRUNCATE;
    return new FsPathBooleanRunner(op, f, new NewLengthParam(newLength)).run();
}