Skip to content

Latest commit

 

History

History
 
 

quickstart

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Apache HBase using Google Cloud Bigtable - QuickStart

Following these steps should get you to the hbase shell in 3 minutes.

Prerequsites

Project Setup, installation, and configuration

  1. Go to the Cloud Console and create or select your project.

  2. Enable Billing (if not all ready).

  3. Create a new Bigtable Instance

  4. Select APIs & Auth > APIs

Verify that both the Cloud Bigtable API and the Cloud Bigtable Admin API are enabled.

  1. Initialize gcloud via gcloud init. This will initialize your credentials, your default cloud zone and project id.

  2. chmod +x quickstart.sh

  3. ./quickstart.sh will write a valid hbase-site.xml for you.

Alternatively you can just use maven directly.

mvn clean package exec:java -Dbigtable.projectID=... -Dbigtable.instanceID=...

HBase shell

HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.1, rd0a115a7267f54e01c72c603ec53e91ec418292f, Tue Jun 23 14:56:34 PDT 2015

hbase(main):001:0>
  1. Create a table (tableName, Column Family)

    > create 'test', 'cf'

  2. List Tables

    > list

  3. Add some data

    > put 'test', 'row1', 'cf:a', 'value1'

    > put 'test', 'row2', 'cf:b', 'value2'

    > put 'test', 'row3', 'cf:c', 'value3'

  4. Scan the table for data

    > scan 'test'

  5. Get a single row of data

    > get 'test', 'row1'

  6. Disable a table

    > disable 'test'

  7. Drop the table

    > drop 'test'

  8. Finished

    > exit

Licensing