Skip to content
Published on

HBase 3.0 Install on Ubuntu (Non Secure)

Authors
  • Name
    Twitter

Overview

Following the HBase build instructions, I will share the cluster mode installation method.

Zookeeper

Zookeeper Binary Download

Find the desired version of Zookeeper from the official Zookeeper download page.

wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.0/apache-zookeeper-3.8.0-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.0-bin.tar.gz
sudo cp -r apache-zookeeper-3.8.0-bin /usr/local/zookeeper

Zookeeper conf

zookeeper/conf/zoo.cfg
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/var/zookeeper
clientPort=2181
server.1=ubuntu01:2888:3888
server.2=ubuntu02:2888:3888
server.3=ubuntu03:2888:3888

Creating the myid file

Create a file named myid under the /var/zookeeper directory, and write a unique number for each Zookeeper server. Typically, you write 1 for node 1, 2 for node 2, and 3 for node 3.

mkdir /var/zookeeper
vim /var/zookeeper/myid

HBase

HBase binary install

Find the desired binary version from hbase download versions.

wget https://www.apache.org/dyn/closer.lua/hbase/3.0.0-alpha-3/hbase-3.0.0-alpha-3-bin.tar.gz
tar -zxvf  hbase-3.0.0-alpha-3-bin.tar.gz
sudo cp -r hbase-3.0.0-alpha-3 /usr/local/hbase

HBase configuration

hbase-site.xml
<configuration>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://ubuntu01:9000/hbase</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
  </property>
  <property>
	  <name>hbase.zookeeper.quorum</name>
	  <value>ubuntu01,ubuntu02,ubuntu03</value>
  </property>
  <property>
  <name>hbase.wal.provider</name>
  <value>filesystem</value>
</property>
</configuration>
hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_CLASSPATH=${HADOOP_CONF_DIR}
export HBASE_MANAGES_ZK=false
hbase/conf/regionservers
ubuntu02
ubuntu03
ubuntu04
ubuntu05
ubuntu06

Starting Zookeeper

Start the Zookeeper server on ubuntu01, ubuntu02, and ubuntu03 using the following command.

zookeeper/bin/zkServer.sh start

Starting HBase

When you run the following command, HMaster will start on the master node ubuntu01, and regionservers will start on the remaining nodes ubuntu02 through ubuntu06.

start-hbase.sh

When you enter the jps command, the master node will display something like the following. The Zookeeper process is displayed as QuorumPeerMain.

1693816 ResourceManager
1702488 SecondaryNameNode
1787785 Jps
1771793 QuorumPeerMain
1781957 HMaster
1701958 NameNode

When you enter jps on a worker node, it displays the following.

1785194 HRegionServer
1703882 DataNode
1786480 Jps
1704373 NodeManager

HBase Web UI Verification

You can check the status of HMaster and region servers by accessing http://ubuntu01:16010.