HBase installation on Ubuntu
Steps to install HBase on Ubuntu Machine:
- Download latest Hbase from http://hbase.apache.org/
- extract it to hbase
- Set JAVA_HOME variable in conf/hbase-env.sh
- Add hbase/bin to PATH variable
- go to hbase folder
- $bin/hbase if it is giving some thing means hbase installed correctly
Start and Stop the HBase:
- Start the hbase : $bin/hbase start-hbase.sh
- Stop the hbase : $bin/hbase stop-hbase.sh // this will take time and remember stop the hadoop first and then stop the hbase.
HBase Shell Commands:
- $bin/hbase shell run this command to enter into hbase shell
- To see list of tables created in hbase $bin/hbase list
- To create a table in hbase $create ‘test’,’cf’
- Insert some values into the above created test $put ‘test’,’row1’,’cf:a’,’value1’
- To see the data $ scan ‘test’
- To get one row from the hbase table $ get ‘test’,’row1’.
To Delete Hbase table:
- after disabling we can able to drop it $disable ‘test’ and then $drop ‘test’
Hope it helps.
Thanks.
Categories: HBase
Comments (0)
Trackbacks (0)
Leave a comment
Trackback