public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(alluxio.grpc.CreateFilePOptions prototype) {
public static Builder newBuilder(alluxio.grpc.CreateFilePOptions prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
/** * @return the instance of {@link CreateFileContext} with default values for master */ public static CreateFileContext defaults() { CreateFilePOptions masterOptions = FileSystemMasterOptions.createFileDefaults(); return new CreateFileContext(masterOptions.toBuilder()); }
alluxio.grpc.CreateFilePOptions.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = options_.toBuilder();
/** * Merges and embeds the given {@link CreateFilePOptions} with the corresponding master options. * * @param optionsBuilder Builder for proto {@link CreateFilePOptions} to embed * @return the instance of {@link CreateFileContext} with default values for master */ public static CreateFileContext defaults(CreateFilePOptions.Builder optionsBuilder) { CreateFilePOptions masterOptions = FileSystemMasterOptions.createFileDefaults(); CreateFilePOptions.Builder mergedOptionsBuilder = masterOptions.toBuilder().mergeFrom(optionsBuilder.build()); return new CreateFileContext(mergedOptionsBuilder); }
@Override public void createFile(CreateFilePRequest request, StreamObserver<CreateFilePResponse> responseObserver) { String path = request.getPath(); CreateFilePOptions options = request.getOptions(); RpcUtils.call(LOG, (RpcUtils.RpcCallableThrowsIOException<CreateFilePResponse>) () -> { mFileSystemMaster.createFile(new AlluxioURI(path), CreateFileContext.defaults(options.toBuilder())); return CreateFilePResponse.newBuilder().build(); }, "CreateFile", "path=%s, options=%s", responseObserver, path, options); }