Following these steps should get you to the hbase shell in 5 minutes.
-
Install Docker:
- Mac OS/X:
- Download, install, and run Kitematic
- Press Command-Shift-T when you need to open a docker shell window.
- Linux, Windows, and others - Follow the instructions for your operating system
- Mac OS/X:
-
A copy of this project installed on your computer
- Go to the Cloud Console and create or select your project.
You will need the ProjectID later.
-
Enable Billing.
-
Select Storage > Cloud Bigtable > New Cluster
You will need both the Zone (which should be near you) and the Unique ID.
- Select APIs & Auth > APIs
Verify that both the Cloud Bigtable API and the Cloud Bigtable Admin API are enabled.
-
Select APIs & Auth > Credentials
Generate and download a new JSON key
-
Copy your JSON key to the local directory for this project and rename as key.json
-
chmod +x create-hbase-site
-
./create-hbase-site
will write a valid hbase-site.xml for you. -
In your terminal window give the following command:
docker build -t bigtable-hbase .
<== Note the final '.'
- Give the following command:
docker run -it bigtable-hbase
-
At the prompt enter:
hbase shell
-
Create a table (tableName, Column Family)
> create table 'test', 'cf'
- List Tables
> list
- Add some data
> put 'test', 'row1', 'cf:a', 'value1'
> put 'test', 'row2', 'cf:b', 'value2'
> put 'test', 'row3', 'cf:c', 'value3'
- Scan the table for data
> scan 'test'
- Get a single row of data
> get 'test', 'row1'
- Disable a table
> disable 'test'
- Drop the table
> drop 'test'
- Finished
> exit
- Done with container
$ exit
- See CONTRIBUTING.md
- See LICENSE