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

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

Introduction

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

Prototype

public BlockSizeParam(final String str) 

Source Link

Document

Constructor.

Usage

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

License:Apache License

@Override
public FSDataOutputStream create(final Path f, final FsPermission permission, final boolean overwrite,
        final int bufferSize, final short replication, final long blockSize, final Progressable progress)
        throws IOException {
    statistics.incrementWriteOps(1);//from  w  w  w.j a v  a  2 s . com

    final HttpOpParam.Op op = PutOpParam.Op.CREATE;
    if (this.shouldUseEncryption) {
        return new EncryptedFsPathOutputStreamRunner(op, f, bufferSize,
                new PermissionParam(applyUMask(permission)), new OverwriteParam(overwrite),
                new BufferSizeParam(bufferSize), new ReplicationParam(replication),
                new BlockSizeParam(blockSize)).run();
    } else {
        return new FsPathOutputStreamRunner(op, f, bufferSize, new PermissionParam(applyUMask(permission)),
                new OverwriteParam(overwrite), new BufferSizeParam(bufferSize),
                new ReplicationParam(replication), new BlockSizeParam(blockSize)).run();
    }
}