Apache HBase is an open source, non-relational, distributed
database modeled after Google's BigTable and is written in Java. It is
developed as part of Apache Software Foundation's Apache Hadoop project
and runs on top of HDFS (Hadoop Distributed File System), providing
BigTable-like capabilities for Hadoop. That is, it provides a
fault-tolerant way of storing large quantities of sparse data (small
amounts of information caught within a large collection of empty or
unimportant data, such as finding the 50 largest items in a group of 2
billion records, or finding the non-zero items representing less than
0.1% of a huge collection).
Pre Requirements
1) A machine with Ubuntu 14.04 LTS operating system installed.
2) Apache HBase 1.2.3 Software (Download Here)
HBase Standalone Mode Installation
This post describes setup of a standalone HBase instance that uses the local filesystem. It leads you through creating a table, inserting rows via the HBase shell, and then cleaning up and shutting down your standalone HBase instance.
HBase Installation Steps
Step 1 - Installing java 7. Open a terminal (CTRL + ALT + T) and type the following sudo command.
Verify Installation
Step 2 - Edit /etc/hosts file.
/etc/hosts file. Add machine IP address and hostname. Save and close.
Step 3 - Creating /usr/local/hbase directory.
Step 4 - Change the ownership and permissions of the directory /usr/local/hbase. Here 'hduser' is an Ubuntu username.
Step 5 - Creating /var/hbase/pids directory.
Step 6 - Change the ownership and permissions of the directory /var/hbase/pids. Here 'hduser' is an Ubuntu username.
Step 7 - Change the directory to /home/hduser/Desktop , In my case the downloaded hbase-1.2.3-bin.tar.gz file is in /home/hduser/Desktop folder. For you it might be in /downloads folder check it.
Step 8 - Untar the hbase-1.2.3-bin.tar.gz file.
Step 9 - Move the contents of hbase-1.2.3 folder to /usr/local/hbase
Step 10 - Edit $HOME/.bashrc file by adding the java and hadoop path.
$HOME/.bashrc file. Add the following lines
Step 11 - Reload your changed $HOME/.bashrc settings
Step 12 - Change the directory to /usr/local/hbase/conf
Step 13 - Edit hbase-env.sh file.
Step 14 - Add the below lines to hadoop-env.sh file. Save and Close.
Step 15 - Edit hbase-site.xml file.
Step 16 - Add the below lines to hbase-site.xml file. Save and Close.
Step 17 - Change the directory to /usr/local/hbase/bin
Step 18 - Start all hbase daemons.
Step 19 - The JPS (Java Virtual Machine Process Status Tool) tool is limited to reporting information on JVMs for which it has the access permissions.
Once the HBase is up and running check the web-ui of the components as described below
To Enter into HBase Shell
Step 20 - Stop all hbase daemons.
Pre Requirements
1) A machine with Ubuntu 14.04 LTS operating system installed.
2) Apache HBase 1.2.3 Software (Download Here)
HBase Standalone Mode Installation
This post describes setup of a standalone HBase instance that uses the local filesystem. It leads you through creating a table, inserting rows via the HBase shell, and then cleaning up and shutting down your standalone HBase instance.
HBase Installation Steps
Step 1 - Installing java 7. Open a terminal (CTRL + ALT + T) and type the following sudo command.
$ sudo apt-get install openjdk-7-jdk
$ java -version
$ sudo gedit /etc/hosts
127.0.0.1 localhost 127.0.0.1 praveen
$ sudo mkdir /usr/local/hbase
$ sudo chown -R hduser /usr/local/hbase
$ sudo chmod -R 755 /usr/local/hbase
$ sudo mkdir /var/hbase/pids
$ sudo chown -R hduser /var/hbase/pids
$ sudo chmod -R 755 /var/hbase/pids
$ cd /home/hduser/Desktop/
$ tar xzf hbase-1.2.3-bin.tar.gz
$ mv hbase-1.2.3/* /usr/local/hbase
$ sudo gedit $HOME/.bashrc
export HBASE_HOME=/usr/local/hbase PATH=$PATH:$HBASE_HOME/bin export CLASSPATH=$CLASSPATH:/usr/local/hbase/lib/*
$ source $HOME/.bashrc
$ cd /usr/local/hbase/conf
$ gedit hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 export HBASE_PID_DIR=/var/hbase/pids
$ gedit hbase-site.xml
<property> <name>hbase.rootdir</name> <value>file:///home/hduser/HBase/hbase</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/hduser/HBase/</value> </property>
$ cd /usr/local/hbase/bin
$ ./start-hbase.sh
Step 19 - The JPS (Java Virtual Machine Process Status Tool) tool is limited to reporting information on JVMs for which it has the access permissions.
$ jps
Once the HBase is up and running check the web-ui of the components as described below
http://localhost:16010
$ hbase shell
Step 20 - Stop all hbase daemons.
$ ./stop-hbase.sh
Comments
Post a Comment