Tabnine Logo
BigtableTableAdminClient
Code IndexAdd Tabnine to your IDE (free)

How to use
BigtableTableAdminClient
in
com.google.cloud.bigtable.grpc

Best Java code snippets using com.google.cloud.bigtable.grpc.BigtableTableAdminClient (Showing top 20 results out of 315)

origin: com.google.cloud.bigtable/bigtable-hbase-2.x

/**
 * Creates a new table asynchronously. The table can be created with a full set of initial column
 * families, specified in the request.
 *
 * @param request a {@link CreateTableRequest} object.
 */
public CompletableFuture<Table> createTableAsync(CreateTableRequest request) {
 return toCompletableFuture(adminClient.createTableAsync(request));
}
origin: com.google.cloud.bigtable/bigtable-hbase-2.x

 /**
  * Creates a new table from a snapshot.
  * @param request a {@link CreateTableFromSnapshotRequest} object.
  * @return The long running {@link Operation} for the request.
  */
 public CompletableFuture<Operation> createTableFromSnapshotAsync(CreateTableFromSnapshotRequest request) {
  return toCompletableFuture(adminClient.createTableFromSnapshotAsync(request));
 }
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * Permanently deletes the specified snapshot.
 * @param request a {@link DeleteSnapshotRequest} object.
 */
public CompletableFuture<Empty> deleteSnapshotAsync(DeleteSnapshotRequest request) {
 return toCompletableFuture(adminClient.deleteSnapshotAsync(request));
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public Table getTable(String tableId) {
 GetTableRequest requestProto = GetTableRequest.newBuilder()
   .setName(instanceName.toTableNameStr(tableId))
   .build();
 return Table.fromProto(adminClient.getTable(requestProto));
}
origin: com.google.cloud.bigtable/bigtable-hbase

/**
 * @param request a {@link CreateTableRequest} object to send.
 * @throws java.io.IOException if any.
 */
protected void createTable(TableName tableName, CreateTableRequest request)
    throws IOException {
 try {
  bigtableTableAdminClient.createTable(
      request.toProto(bigtableInstanceName.toAdminInstanceName()));
 } catch (Throwable throwable) {
  throw convertToTableExistsException(tableName, throwable);
 }
}
origin: com.google.cloud.bigtable/bigtable-hbase

/** {@inheritDoc} */
@Override
public void deleteTable(TableName tableName) throws IOException {
 Builder deleteBuilder = DeleteTableRequest.newBuilder();
 deleteBuilder.setName(toBigtableName(tableName));
 try {
  bigtableTableAdminClient.deleteTable(deleteBuilder.build());
 } catch (Throwable throwable) {
  throw new IOException(
    String.format(
      "Failed to delete table '%s'",
      tableName.getNameAsString()),
    throwable);
 }
 disabledTables.remove(tableName);
}
origin: com.google.cloud.bigtable/bigtable-hbase-2.x

/**
 * Permanently deletes a specified table and all of its data.
 *
 * @param request a {@link DeleteTableRequest} object.
 * @return a {@link CompletableFuture} that returns {@link Empty} object.
 */
public CompletableFuture<Empty> deleteTableAsync(DeleteTableRequest request){
 return toCompletableFuture(adminClient.deleteTableAsync(request));
}
origin: com.google.cloud.bigtable/bigtable-hbase-2.x

/**
 * Permanently deletes all rows in a range.
 *
 * @param request a {@link DropRowRangeRequest} object.
 * @return a {@link CompletableFuture} that returns {@link Empty} object.
 */
public CompletableFuture<Empty> dropRowRangeAsync(DropRowRangeRequest request) {
 return toCompletableFuture(adminClient.dropRowRangeAsync(request));
}
origin: com.google.cloud.bigtable/bigtable-hbase-2.x

/**
 * Gets the details of a table asynchronously.
 *
 * @param request a {@link GetTableRequest} object.
 * @return a {@link CompletableFuture} that returns a {@link Table} object.
 */
public CompletableFuture<Table> getTableAsync(GetTableRequest request) {
 return toCompletableFuture(adminClient.getTableAsync(request));
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public void dropRowRange(String tableId, String rowKeyPrefix) {
 adminClient.dropRowRange(buildDropRowRangeRequest(tableId, rowKeyPrefix));
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

@Override
public boolean tableExists(String tableId) throws IOException {
 try (BigtableSession session = new BigtableSession(options)) {
  GetTableRequest getTable =
    GetTableRequest.newBuilder()
      .setName(options.getInstanceName().toTableNameStr(tableId))
      .build();
  session.getTableAdminClient().getTable(getTable);
  return true;
 } catch (StatusRuntimeException e) {
  if (e.getStatus().getCode() == Code.NOT_FOUND) {
   return false;
  }
  String message =
    String.format(
      "Error checking whether table %s (BigtableOptions %s) exists", tableId, options);
  LOG.error(message, e);
  throw new IOException(message, e);
 }
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public Table createTable(CreateTableRequest request) {
 com.google.bigtable.admin.v2.CreateTableRequest requestProto =
   request.toProto(instanceName.getProjectId(), instanceName.getInstanceId());
 adminClient.createTable(requestProto);
 return getTable(requestProto.getTableId());
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public void deleteTable(String tableId) {
 DeleteTableRequest request = DeleteTableRequest.newBuilder()
   .setName(instanceName.toTableNameStr(tableId))
   .build();
 adminClient.deleteTable(request);
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * Permanently deletes a specified table and all of its data.
 *
 * @param request a {@link DeleteTableRequest} object.
 * @return a {@link CompletableFuture} that returns {@link Empty} object.
 */
public CompletableFuture<Empty> deleteTableAsync(DeleteTableRequest request){
 return toCompletableFuture(adminClient.deleteTableAsync(request));
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/** {@inheritDoc} */
@Override
public ListenableFuture<Void> dropRowRangeAsync(String tableId, String rowKeyPrefix) {
 return Futures.transform(
   adminClient.dropRowRangeAsync(buildDropRowRangeRequest(tableId, rowKeyPrefix)),
   new Function<Empty, Void>() {
    @Override
    public Void apply(Empty empty) {
     return null;
    }
   }, MoreExecutors.directExecutor());
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * Gets the details of a table asynchronously.
 *
 * @param request a {@link GetTableRequest} object.
 * @return a {@link CompletableFuture} that returns a {@link Table} object.
 */
public CompletableFuture<Table> getTableAsync(GetTableRequest request) {
 return toCompletableFuture(adminClient.getTableAsync(request));
}
origin: com.google.cloud.bigtable/bigtable-hbase

private void issueBulkDelete(TableName tableName, DropRowRangeRequest.Builder deleteRequest)
  throws IOException {
 try {
  bigtableTableAdminClient
    .dropRowRange(deleteRequest.setName(toBigtableName(tableName)).build());
 } catch (Throwable throwable) {
  throw new IOException(
    String.format("Failed to truncate table '%s'", tableName.getNameAsString()), throwable);
 }
}
origin: com.google.cloud.bigtable/bigtable-hbase

/** {@inheritDoc} */
@Override
public HTableDescriptor getTableDescriptor(TableName tableName) throws IOException {
 if (tableName == null) {
  return null;
 }
 String bigtableTableName = toBigtableName(tableName);
 GetTableRequest request = GetTableRequest.newBuilder().setName(bigtableTableName).build();
 try {
  return tableAdapter.adapt(bigtableTableAdminClient.getTable(request));
 } catch (Throwable throwable) {
  if (Status.fromThrowable(throwable).getCode() == Status.Code.NOT_FOUND) {
   throw new TableNotFoundException(tableName);
  }
  throw new IOException("Failed to getTableDescriptor() on " + tableName, throwable);
 }
}
origin: GoogleCloudPlatform/cloud-bigtable-client

/**
 * Creates a new table asynchronously. The table can be created with a full set of initial column
 * families, specified in the request.
 *
 * @param request a {@link CreateTableRequest} object.
 */
public CompletableFuture<Table> createTableAsync(CreateTableRequest request) {
 return toCompletableFuture(adminClient.createTableAsync(request));
}
origin: org.apache.beam/beam-sdks-java-io-google-cloud-platform

/** Helper function to create an empty table. */
private void createEmptyTable(String instanceName, String tableId) {
 Table.Builder tableBuilder = Table.newBuilder();
 tableBuilder.putColumnFamilies(COLUMN_FAMILY_NAME, ColumnFamily.newBuilder().build());
 CreateTableRequest.Builder createTableRequestBuilder =
   CreateTableRequest.newBuilder()
     .setParent(instanceName)
     .setTableId(tableId)
     .setTable(tableBuilder.build());
 tableAdminClient.createTable(createTableRequestBuilder.build());
}
com.google.cloud.bigtable.grpcBigtableTableAdminClient

Javadoc

A client for the Cloud Bigtable Table Admin API.

Most used methods

  • getTable
  • createTable
  • createTableAsync
  • deleteTable
  • createTableFromSnapshotAsync
  • deleteSnapshotAsync
  • deleteTableAsync
  • dropRowRange
  • dropRowRangeAsync
  • getTableAsync
  • listSnapshotsAsync
  • listTables
  • listSnapshotsAsync,
  • listTables,
  • listTablesAsync,
  • modifyColumnFamily,
  • modifyColumnFamilyAsync,
  • snapshotTableAsync,
  • getSnapshotAsync

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now