use of alluxio.master.file.contexts.GrpcCallTracker in project alluxio by Alluxio.
the class FileSystemMasterClientServiceHandler method remove.
@Override
public void remove(DeletePRequest request, StreamObserver<DeletePResponse> responseObserver) {
RpcUtils.call(LOG, () -> {
AlluxioURI pathUri = getAlluxioURI(request.getPath());
mFileSystemMaster.delete(pathUri, DeleteContext.create(request.getOptions().toBuilder()).withTracker(new GrpcCallTracker(responseObserver)));
return DeletePResponse.newBuilder().build();
}, "Remove", "request=%s", responseObserver, request);
}
use of alluxio.master.file.contexts.GrpcCallTracker in project alluxio by Alluxio.
the class FileSystemMasterClientServiceHandler method createDirectory.
@Override
public void createDirectory(CreateDirectoryPRequest request, StreamObserver<CreateDirectoryPResponse> responseObserver) {
CreateDirectoryPOptions options = request.getOptions();
RpcUtils.call(LOG, () -> {
AlluxioURI pathUri = getAlluxioURI(request.getPath());
mFileSystemMaster.createDirectory(pathUri, CreateDirectoryContext.create(options.toBuilder()).withTracker(new GrpcCallTracker(responseObserver)));
return CreateDirectoryPResponse.newBuilder().build();
}, "CreateDirectory", "request=%s", responseObserver, request);
}
use of alluxio.master.file.contexts.GrpcCallTracker in project alluxio by Alluxio.
the class FileSystemMasterClientServiceHandler method getStatus.
@Override
public void getStatus(GetStatusPRequest request, StreamObserver<GetStatusPResponse> responseObserver) {
GetStatusPOptions options = request.getOptions();
RpcUtils.call(LOG, () -> {
AlluxioURI pathUri = getAlluxioURI(request.getPath());
return GetStatusPResponse.newBuilder().setFileInfo(GrpcUtils.toProto(mFileSystemMaster.getFileInfo(pathUri, GetStatusContext.create(options.toBuilder()).withTracker(new GrpcCallTracker(responseObserver))))).build();
}, "GetStatus", true, "request=%s", responseObserver, request);
}
use of alluxio.master.file.contexts.GrpcCallTracker in project alluxio by Alluxio.
the class FileSystemMasterClientServiceHandler method rename.
@Override
public void rename(RenamePRequest request, StreamObserver<RenamePResponse> responseObserver) {
RpcUtils.call(LOG, () -> {
AlluxioURI srcPathUri = getAlluxioURI(request.getPath());
AlluxioURI dstPathUri = getAlluxioURI(request.getDstPath());
mFileSystemMaster.rename(srcPathUri, dstPathUri, RenameContext.create(request.getOptions().toBuilder()).withTracker(new GrpcCallTracker(responseObserver)));
return RenamePResponse.newBuilder().build();
}, "Rename", "request=%s", responseObserver, request);
}
use of alluxio.master.file.contexts.GrpcCallTracker in project alluxio by Alluxio.
the class FileSystemMasterClientServiceHandler method setAttribute.
@Override
public void setAttribute(SetAttributePRequest request, StreamObserver<SetAttributePResponse> responseObserver) {
RpcUtils.call(LOG, () -> {
AlluxioURI pathUri = getAlluxioURI(request.getPath());
mFileSystemMaster.setAttribute(pathUri, SetAttributeContext.create(request.getOptions().toBuilder()).withTracker(new GrpcCallTracker(responseObserver)));
return SetAttributePResponse.newBuilder().build();
}, "SetAttribute", "request=%s", responseObserver, request);
}
Aggregations