@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * * * <pre> * The request that prompted the initiation of this CreateTableFromSnapshot * operation. * </pre> * * <code>.google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1;</code> */ public Builder mergeOriginalRequest( com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest value) { if (originalRequestBuilder_ == null) { if (originalRequest_ != null) { originalRequest_ = com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.newBuilder( originalRequest_) .mergeFrom(value) .buildPartial(); } else { originalRequest_ = value; } onChanged(); } else { originalRequestBuilder_.mergeFrom(value); } return this; } /**
CreateTableFromSnapshotRequest.newBuilder() .setParent(parent) .setTableId(tableId)
CreateTableFromSnapshotRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setTableId(tableId)
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * * * <pre> * The request that prompted the initiation of this CreateTableFromSnapshot * operation. * </pre> * * <code>.google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1;</code> */ public Builder mergeOriginalRequest( com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest value) { if (originalRequestBuilder_ == null) { if (originalRequest_ != null) { originalRequest_ = com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.newBuilder( originalRequest_) .mergeFrom(value) .buildPartial(); } else { originalRequest_ = value; } onChanged(); } else { originalRequestBuilder_.mergeFrom(value); } return this; } /**
@Override public CompletableFuture<Void> cloneSnapshot(String snapshotName, TableName tableName) { return CompletableFuture.supplyAsync(() -> { try { return CreateTableFromSnapshotRequest.newBuilder() .setParent(options.getInstanceName().toString()) .setTableId(tableName.getNameAsString()) .setSourceSnapshot(getClusterName().toSnapshotName(snapshotName)).build(); } catch (IOException e) { throw new CompletionException(e); } }).thenCompose( c -> bigtableTableAdminClient.createTableFromSnapshotAsync(c).thenApply(r -> null)); }
@Override public CompletableFuture<Void> cloneSnapshot(String snapshotName, TableName tableName) { return CompletableFuture.supplyAsync(() -> { try { return CreateTableFromSnapshotRequest.newBuilder() .setParent(options.getInstanceName().toString()) .setTableId(tableName.getNameAsString()) .setSourceSnapshot(getClusterName().toSnapshotName(snapshotName)).build(); } catch (IOException e) { throw new CompletionException(e); } }).thenCompose( c -> bigtableTableAdminClient.createTableFromSnapshotAsync(c).thenApply(r -> null)); }
CreateTableFromSnapshotRequest.newBuilder() .setParent(parent) .setTableId(tableId)
/** {@inheritDoc} */ @Override public void cloneSnapshot(String snapshotName, TableName tableName) throws IOException, TableExistsException, RestoreSnapshotException { CreateTableFromSnapshotRequest request = CreateTableFromSnapshotRequest.newBuilder() .setParent(options.getInstanceName().toString()) .setTableId(tableName.getNameAsString()) .setSourceSnapshot(getClusterName().toSnapshotName(snapshotName)) .build(); Operation operation = Futures .getChecked(bigtableTableAdminClient.createTableFromSnapshotAsync(request), IOException.class); try { connection.getSession().getInstanceAdminClient(). waitForOperation(operation); } catch (TimeoutException e) { throw new IOException("Timed out waiting for cloneSnapshot operation to finish", e); } }
/** {@inheritDoc} */ @Override public void cloneSnapshot(String snapshotName, TableName tableName) throws IOException, TableExistsException, RestoreSnapshotException { CreateTableFromSnapshotRequest request = CreateTableFromSnapshotRequest.newBuilder() .setParent(options.getInstanceName().toString()) .setTableId(tableName.getNameAsString()) .setSourceSnapshot(getClusterName().toSnapshotName(snapshotName)) .build(); Operation operation = Futures .getChecked(bigtableTableAdminClient.createTableFromSnapshotAsync(request), IOException.class); try { connection.getSession().getInstanceAdminClient(). waitForOperation(operation); } catch (TimeoutException e) { throw new IOException("Timed out waiting for cloneSnapshot operation to finish", e); } }
CreateTableFromSnapshotRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setTableId(tableId)