This example shows how to create a simple Java application that communicates
with Cloud Bigtable through the HBase API. The code for this example
is in the GitHub repository GoogleCloudPlatform/cloud-bigtable-examples, in
the directory java/simple-cli
.
Overview of the code sample
This example includes a single class, HBaseCLI
, that
communicates with Cloud Bigtable and provides a simple command-line
interface (CLI). The HBaseCLI
class uses the standard HBase API
to communicate with Cloud Bigtable.
For example, the following code, taken from the PutCommand
class, writes a
value to a column:
A Maven POM file is used to build the project. Once the project is
built, a shell script, hbasecli.sh
, launches the CLI
with the correct classpath and boot classpath.