List of usage examples for org.apache.hadoop.hdfs.web.resources PermissionParam PermissionParam
public PermissionParam(final String str)
From source file:com.bigstep.datalake.DLFileSystem.java
License:Apache License
@Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { statistics.incrementWriteOps(1);/*from ww w .ja v a2 s.co m*/ final HttpOpParam.Op op = PutOpParam.Op.MKDIRS; return new FsPathBooleanRunner(op, f, new PermissionParam(applyUMask(permission))).run(); }
From source file:com.bigstep.datalake.DLFileSystem.java
License:Apache License
@Override public void setPermission(final Path p, final FsPermission permission) throws IOException { statistics.incrementWriteOps(1);//from w w w . ja va 2s . c o m final HttpOpParam.Op op = PutOpParam.Op.SETPERMISSION; new FsPathRunner(op, p, new PermissionParam(permission)).run(); }
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);// w ww . j av a 2s . c o m 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(); } }