use of org.apache.hadoop.hdfs.web.resources.HttpOpParam.Op in project hadoop by apache.
the class WebHdfsFileSystem method mkdirs.
@Override
public boolean mkdirs(Path f, FsPermission permission) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.MKDIRS);
final HttpOpParam.Op op = PutOpParam.Op.MKDIRS;
final FsPermission modes = applyUMask(permission);
return new FsPathBooleanRunner(op, f, new PermissionParam(modes.getMasked()), new UnmaskedPermissionParam(modes.getUnmasked())).run();
}
use of org.apache.hadoop.hdfs.web.resources.HttpOpParam.Op in project hadoop by apache.
the class WebHdfsFileSystem method unsetStoragePolicy.
@Override
public void unsetStoragePolicy(Path src) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.UNSET_STORAGE_POLICY);
final HttpOpParam.Op op = PostOpParam.Op.UNSETSTORAGEPOLICY;
new FsPathRunner(op, src).run();
}
use of org.apache.hadoop.hdfs.web.resources.HttpOpParam.Op in project hadoop by apache.
the class WebHdfsFileSystem method append.
@Override
public FSDataOutputStream append(final Path f, final int bufferSize, final Progressable progress) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.APPEND);
final HttpOpParam.Op op = PostOpParam.Op.APPEND;
return new FsPathOutputStreamRunner(op, f, bufferSize, new BufferSizeParam(bufferSize)).run();
}
use of org.apache.hadoop.hdfs.web.resources.HttpOpParam.Op in project hadoop by apache.
the class WebHdfsFileSystem method allowSnapshot.
public void allowSnapshot(final Path p) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.ALLOW_SNAPSHOT);
final HttpOpParam.Op op = PutOpParam.Op.ALLOWSNAPSHOT;
new FsPathRunner(op, p).run();
}
use of org.apache.hadoop.hdfs.web.resources.HttpOpParam.Op in project hadoop by apache.
the class WebHdfsFileSystem method rename.
@Override
public boolean rename(final Path src, final Path dst) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.RENAME);
final HttpOpParam.Op op = PutOpParam.Op.RENAME;
return new FsPathBooleanRunner(op, src, new DestinationParam(makeQualified(dst).toUri().getPath())).run();
}
Aggregations