Skip to content

Latest commit

 

History

History
 
 

google-cloud-bigtable-admin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Google Cloud Java Client for Bigtable Admin

Java idiomatic client for Cloud Bigtable Admin. Please note that this client is under heavy development and is not ready for production use. Please continue to use the HBase API client for production.

Kokoro CI Maven Codacy Badge

Note: This client is under heavy development and should not be used in production.

Quickstart

If you are using Maven, add this to your pom.xml file

<dependency>
  <groupId>com.google.cloud</groupId>
  <artifactId>google-cloud-bigtable-admin</artifactId>
  <version>0.74.0-alpha</version>
</dependency>

If you are using Gradle, add this to your dependencies

compile 'com.google.cloud:google-cloud-bigtable-admin:0.74.0-alpha'

If you are using SBT, add this to your dependencies

libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.74.0-alpha"

Authentication

See the Authentication section in the base directory's README.

About Cloud Bigtable Admin

Cloud Bigtable is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. The API is split into the data api and the admin api. This client targets the admin api.

Be sure to activate the Cloud Bigtable Admin API on the Developer's Console to use Cloud Bigtable from your project.

See the Bigtable Amin client lib docs to learn how to interact with Cloud Bigtable Admin API using this Client Library.

Getting Started

Prerequisites

For this tutorial, you will need a Google Developers Console project with the Cloud Bigtable API enabled. You will need to enable billing to use Google Cloud Bigtable. Follow these instructions to get your project set up. You will also need to set up the local development environment by installing the Google Cloud SDK and running the following commands in command line: gcloud auth login.

Calling Cloud Bigtable

The Cloud Bigtable API is split into 2 parts: Data API, Instance Admin API and Table Admin API.

Here is a code snippet showing simple usage of the Table API. Add the following imports at the top of your file:

import static com.google.cloud.bigtable.admin.v2.models.GCRules.GCRULES;
import com.google.bigtable.admin.v2.InstanceName;
import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient;
import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest;
import com.google.cloud.bigtable.admin.v2.models.Table;

Then, to create a table, use the following code:

InstanceName instanceName = InstanceName.of("my-project", "my-instance");

BigtableTableAdminClient tableAdminClient = BigtableTableAdminClient.create(instanceName);

try {
  Table createdTable = tableAdminClient.createTable(
    CreateTableRequest.of("my-table")
      .addFamily("cf2", GCRULES.maxVersions(10));
} finally {
  tableAdminClient.close();
}

Troubleshooting

To get help, follow the instructions in the shared Troubleshooting document.

Transport

Bigtable uses gRPC for the transport layer.

Java Versions

Java 7 or above is required for using this client.

Versioning

This library follows Semantic Versioning.

It is currently in major version zero (0.y.z), which means that anything may change at any time and the public API should not be considered stable.

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started and [DEVELOPING] for a layout of the codebase.

License

Apache 2.0 - See LICENSE for more information.