Install HBase On Ubuntu 20.04
Install HBase On Ubuntu 20.04
Install HBase On Ubuntu 20.04
04 LTS
You can choose to install HBase in Standalone Mode or Pseudo-Distributed Mode. The setup
process is similar to our Hadoop installation.
hbase-site.xml
Set data directory to an appropriate location on this file.
Now add the following configurations between the <configuration> and </configuration> tags to
look like below.
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:/hadoop/HBase/HFiles</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/hadoop/zookeeper</value>
</property>
</configuration>
By default, unless you configure hbase.rootdir property, your data is still stored in /tmp/.
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/hadoop/zookeeper</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
</configuration>
• Each HMaster uses two ports (16000 and 16010 by default). The port offset is added to these
ports, so using an offset of 2, the backup HMaster would use ports 16002 and 16012
The following command starts 3 backup servers using ports 16002/16012, 16003/16013, and
16005/16015.
$ local-master-backup.sh start 2 3 5
• Each RegionServer requires two ports, and the default ports are 16020 and 16030
The following command starts four additional RegionServers, running on sequential ports starting
at 16022/16032 (base ports 16020/16030 plus 2).
$ local-regionservers.sh start 2 3 4 5
To stop, replace start parameter stop each command followed by the offset of the server to
stop. Example.
$ local-regionservers.sh stop 5
Starting HBase Shell
Hadoop and Hbase should be running before you can use HBase shell. Here the correct order of
starting services.
$ start-all.sh
$ start-hbase.sh
Stopping HBase.
stop-hbase.sh