


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A step-by-step guide on how to install hbase, a distributed nosql database modeled after apache hadoop's hdfs and mapreduce, and how to create, add data to, and retrieve data from a table using the hbase shell. It covers setting up the environment, downloading and installing hbase, starting and stopping the server, and basic table operations.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!
Install Java 1.6+ version. Install latest Apache stable build. Download HBase stable version.
Download the stable version of HBase. In our case it is HBase 0.94.16.
Execute following command to download HBase 0.94.
wget http http://mirror.nexcess.net/apache/hbase/hbase‐0.94.16/hbase‐0.94.16.tar.gz
Unzip the compressed hbase file by executing the following command:
tar –xvzf hbase‐0.94.16.tar.gz
Login as root and create a directory “hbase”, Change the ownership of this directory to the hadoop user “hduser” and group “hadoop”. This is done mainly for our convenience, to differentiate each framework, software and application with different users. Execute the following commands
cd /usr/local mkdir hbase chown ‐R hduser:hadoop /usr/local/hbase
Copy the unzipped hbase binaries into /usr/local/hbase folder
mv hbase‐0.94.16 /usr/local/hbase
Start HBase by executing the following command.
./bin/start‐hbase.sh starting Master, logging to logs/hbase‐user‐master‐example.org.out
Hbase is now set up and is ready for further use. HBase logs can be found in the logs subdirectory. Check them out especially if it seems HBase had trouble starting. Stop HBase by executing the following command.
./bin/stop‐hbase.sh stopping hbase...............
Once the HBase server is started, it is ready to be used.
Connect to HBase shell by executing the following command
./bin/hbase shell HBase Shell; enter 'help
row1 column=cf:a, timestamp=1288380727188, value=value row2 column=cf:b, timestamp=1288380738440, value=value row3 column=cf:c, timestamp=1288380747365, value=value 3 row(s) in 0.0590 seconds
To get a single row from table, execute the following command
hbase(main):008:0> get 'test', 'row1' COLUMN CELL cf:a timestamp=1288380727188, value=value 1 row(s) in 0.0400 seconds
To exit from hbase shell, execute the following command
hbase(main):008:0> exit