Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

HBase Installation and Usage Guide, Study notes of Data Analysis & Statistical Methods

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

2020/2021

Uploaded on 05/16/2021

ashwini-khandre
ashwini-khandre 🇮🇳

5 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
HBaseInstallationGuide
EnvironmentSetup
InstallJava1.6+version.
InstalllatestApachestablebuild.
DownloadHBasestableversion.
HBaseInstallation
DownloadthestableversionofHBase.InourcaseitisHBase0.94.16.
ExecutefollowingcommandtodownloadHBase0.94.16
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ofthis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
pf3
pf4

Partial preview of the text

Download HBase Installation and Usage Guide and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

HBase Installation Guide

Environment Setup

Install Java 1.6+ version. Install latest Apache stable build. Download HBase stable version.

HBase Installation

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...............

HBase Shell

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' for list of supported commands. Type "exit" to leave the HBase Shell Version 0.94.16, r1557241, Fri Jan 10 20:43:03 UTC 2014 hbase(main):001:0>

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