@InternalApi(value="For internal usage only") public class BigtableTableAdminGrpcClient extends Object implements BigtableTableAdminClient
For internal use only - public for technical reasons.
Constructor and Description |
---|
BigtableTableAdminGrpcClient(io.grpc.Channel channel,
ScheduledExecutorService retryExecutorService,
BigtableOptions bigtableOptions)
Constructor for BigtableTableAdminGrpcClient.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> |
createBackupAsync(com.google.bigtable.admin.v2.CreateBackupRequest request)
Creates a new backup from a table in a specific cluster.
|
com.google.bigtable.admin.v2.Table |
createTable(com.google.bigtable.admin.v2.CreateTableRequest request)
Creates a new table.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table> |
createTableAsync(com.google.bigtable.admin.v2.CreateTableRequest request)
Creates a new table asynchronously.
|
com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> |
createTableFromSnapshotAsync(com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest request) |
com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> |
deleteBackupAsync(com.google.bigtable.admin.v2.DeleteBackupRequest request)
Permanently deletes the specified backup.
|
com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> |
deleteSnapshotAsync(com.google.bigtable.admin.v2.DeleteSnapshotRequest request) |
void |
deleteTable(com.google.bigtable.admin.v2.DeleteTableRequest request)
Permanently deletes a specified table and all of its data.
|
com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> |
deleteTableAsync(com.google.bigtable.admin.v2.DeleteTableRequest request)
Permanently deletes a specified table and all of its data.
|
void |
dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest request)
Permanently deletes all rows in a range.
|
com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> |
dropRowRangeAsync(com.google.bigtable.admin.v2.DropRowRangeRequest request)
Permanently deletes all rows in a range.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Backup> |
getBackupAsync(com.google.bigtable.admin.v2.GetBackupRequest request)
Gets metadata information about the specified backup.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Get an IAM policy.
|
com.google.longrunning.Operation |
getOperation(com.google.longrunning.GetOperationRequest request)
Gets the latest state of a long-running operation.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Snapshot> |
getSnapshotAsync(com.google.bigtable.admin.v2.GetSnapshotRequest request) |
com.google.bigtable.admin.v2.Table |
getTable(com.google.bigtable.admin.v2.GetTableRequest request)
Gets the details of a table.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table> |
getTableAsync(com.google.bigtable.admin.v2.GetTableRequest request)
Gets the details of a table asynchronously.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.ListBackupsResponse> |
listBackupsAsync(com.google.bigtable.admin.v2.ListBackupsRequest request)
Lists all backups associated with the specified cluster.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.ListSnapshotsResponse> |
listSnapshotsAsync(com.google.bigtable.admin.v2.ListSnapshotsRequest request) |
com.google.bigtable.admin.v2.ListTablesResponse |
listTables(com.google.bigtable.admin.v2.ListTablesRequest request)
Lists the names of all tables in an instance.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.ListTablesResponse> |
listTablesAsync(com.google.bigtable.admin.v2.ListTablesRequest request)
Lists the names of all tables in an instance asynchronously.
|
com.google.bigtable.admin.v2.Table |
modifyColumnFamily(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request)
Creates, modifies or deletes a new column family within a specified table.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table> |
modifyColumnFamilyAsync(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request)
Creates, modifies or deletes a new column family within a specified table.
|
com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> |
restoreTableAsync(com.google.bigtable.admin.v2.RestoreTableRequest request)
Creates a new table from a backup.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Set an IAM policy.
|
com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> |
snapshotTableAsync(com.google.bigtable.admin.v2.SnapshotTableRequest request) |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Tests an IAM policy.
|
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Backup> |
updateBackupAsync(com.google.bigtable.admin.v2.UpdateBackupRequest request)
Updates the specified backup.
|
com.google.longrunning.Operation |
waitForOperation(com.google.longrunning.Operation operation)
Waits for the long running operation to complete by polling with exponential backoff.
|
com.google.longrunning.Operation |
waitForOperation(com.google.longrunning.Operation operation,
long timeout,
TimeUnit timeUnit)
Waits for the long running operation to complete by polling with exponential backoff.
|
void |
waitForReplication(BigtableTableName tableName,
long timeout)
Blocks until replication has caught up to the point this method was called or timeout is
reached.
|
public BigtableTableAdminGrpcClient(io.grpc.Channel channel, ScheduledExecutorService retryExecutorService, BigtableOptions bigtableOptions)
channel
- a Channel
object.public com.google.bigtable.admin.v2.ListTablesResponse listTables(com.google.bigtable.admin.v2.ListTablesRequest request)
listTables
in interface BigtableTableAdminClient
request
- a ListTablesRequest
object.ListTablesResponse
object.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.ListTablesResponse> listTablesAsync(com.google.bigtable.admin.v2.ListTablesRequest request)
listTablesAsync
in interface BigtableTableAdminClient
request
- a ListTablesRequest
object.ListenableFuture
that returns a ListTablesResponse
object.public com.google.bigtable.admin.v2.Table getTable(com.google.bigtable.admin.v2.GetTableRequest request)
getTable
in interface BigtableTableAdminClient
request
- a GetTableRequest
object.Table
object.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table> getTableAsync(com.google.bigtable.admin.v2.GetTableRequest request)
getTableAsync
in interface BigtableTableAdminClient
request
- a GetTableRequest
object.ListenableFuture
that returns a Table
object.public com.google.bigtable.admin.v2.Table createTable(com.google.bigtable.admin.v2.CreateTableRequest request)
createTable
in interface BigtableTableAdminClient
request
- a CreateTableRequest
object.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table> createTableAsync(com.google.bigtable.admin.v2.CreateTableRequest request)
createTableAsync
in interface BigtableTableAdminClient
request
- a CreateTableRequest
object.public com.google.bigtable.admin.v2.Table modifyColumnFamily(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request)
modifyColumnFamily
in interface BigtableTableAdminClient
request
- a ModifyColumnFamiliesRequest
object.Table
object that contains the updated table structure.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table> modifyColumnFamilyAsync(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request)
modifyColumnFamilyAsync
in interface BigtableTableAdminClient
request
- a ModifyColumnFamiliesRequest
object.public void deleteTable(com.google.bigtable.admin.v2.DeleteTableRequest request)
deleteTable
in interface BigtableTableAdminClient
request
- a DeleteTableRequest
object.public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteTableAsync(com.google.bigtable.admin.v2.DeleteTableRequest request)
deleteTableAsync
in interface BigtableTableAdminClient
request
- a DeleteTableRequest
object.public void dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest request)
dropRowRange
in interface BigtableTableAdminClient
request
- a DropRowRangeRequest
object.public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> dropRowRangeAsync(com.google.bigtable.admin.v2.DropRowRangeRequest request)
dropRowRangeAsync
in interface BigtableTableAdminClient
request
- a DropRowRangeRequest
object.public void waitForReplication(BigtableTableName tableName, long timeout) throws InterruptedException, TimeoutException
waitForReplication
in interface BigtableTableAdminClient
tableName
- the name of the table to wait for replication.timeout
- the maximum time to wait in seconds.InterruptedException
- if call is interrupted while waiting to recheck if replication has
caught up.TimeoutException
- if timeout is reached.public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
getIamPolicy
in interface BigtableTableAdminClient
request
- a GetIamPolicyRequest
object.Policy
object.public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
setIamPolicy
in interface BigtableTableAdminClient
request
- a SetIamPolicyRequest
object.Policy
object.public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
testIamPermissions
in interface BigtableTableAdminClient
request
- a TestIamPermissionsRequest
object.TestIamPermissionsResponse
object.public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> createBackupAsync(com.google.bigtable.admin.v2.CreateBackupRequest request)
BigtableTableAdminClient
createBackupAsync
in interface BigtableTableAdminClient
request
- a CreateBackupRequest
object.Operation
for the request.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Backup> getBackupAsync(com.google.bigtable.admin.v2.GetBackupRequest request)
BigtableTableAdminClient
getBackupAsync
in interface BigtableTableAdminClient
request
- a GetBackupRequest
object.Backup
defined by the request.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Backup> updateBackupAsync(com.google.bigtable.admin.v2.UpdateBackupRequest request)
BigtableTableAdminClient
updateBackupAsync
in interface BigtableTableAdminClient
request
- the request to update the Backup.public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.ListBackupsResponse> listBackupsAsync(com.google.bigtable.admin.v2.ListBackupsRequest request)
BigtableTableAdminClient
listBackupsAsync
in interface BigtableTableAdminClient
request
- a GetBackupRequest
object.ListBackupsResponse
which has the list of the backups in the cluster.public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteBackupAsync(com.google.bigtable.admin.v2.DeleteBackupRequest request)
BigtableTableAdminClient
deleteBackupAsync
in interface BigtableTableAdminClient
request
- a DeleteBackupRequest
object.public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> restoreTableAsync(com.google.bigtable.admin.v2.RestoreTableRequest request)
BigtableTableAdminClient
restoreTableAsync
in interface BigtableTableAdminClient
request
- a RestoreTableRequest
object.Operation
for the request.public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request)
BigtableTableAdminClient.createBackupAsync(CreateBackupRequest)
and BigtableTableAdminClient.restoreTableAsync(RestoreTableRequest)
will return a Operation
. Use this method and pass in the Operation
's name in the request to see if the Operation is done via
Operation.getDone()
. The backup will not be available until that
happens.
getOperation
in interface BigtableTableAdminClient
request
- a GetOperationRequest
object.Operation
object.public com.google.longrunning.Operation waitForOperation(com.google.longrunning.Operation operation) throws IOException, TimeoutException
waitForOperation
in interface BigtableTableAdminClient
IOException
TimeoutException
- If the timeout is exceeded.public com.google.longrunning.Operation waitForOperation(com.google.longrunning.Operation operation, long timeout, TimeUnit timeUnit) throws TimeoutException, IOException
waitForOperation
in interface BigtableTableAdminClient
TimeoutException
- If the timeout is exceeded.IOException
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> snapshotTableAsync(com.google.bigtable.admin.v2.SnapshotTableRequest request)
snapshotTableAsync
in interface BigtableTableAdminClient
public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Snapshot> getSnapshotAsync(com.google.bigtable.admin.v2.GetSnapshotRequest request)
getSnapshotAsync
in interface BigtableTableAdminClient
public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.ListSnapshotsResponse> listSnapshotsAsync(com.google.bigtable.admin.v2.ListSnapshotsRequest request)
listSnapshotsAsync
in interface BigtableTableAdminClient
public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteSnapshotAsync(com.google.bigtable.admin.v2.DeleteSnapshotRequest request)
deleteSnapshotAsync
in interface BigtableTableAdminClient
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> createTableFromSnapshotAsync(com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest request)
createTableFromSnapshotAsync
in interface BigtableTableAdminClient