My setup for Hbase 2.5.3 on Ubuntu 20.04

This day I setup the latest Apache Hbase (version 2.5.3) on my Ubuntu 20.04 development box.

Here is Java/Hadoop version for this installation.

 ~$ hadoop version
Hadoop 3.3.4

~$ java -version
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)

And I have zookeeper pre-installed on this host, which listens on port 2181.

 ~$ nc -zv 127.0.0.1 2181
Connection to 127.0.0.1 2181 port [tcp/*] succeeded!

Just untar the binary package into /opt/hbase dir, and set up the environment variables as follows.

 export HBASE_HOME=/opt/hbase
export HBASE_MANAGES_ZK=false

They can be put into user's .bash_profile file.

Next, modify the content of /opt/hbase/conf/hbase-site.xml as follows.

 <configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>

<property>
<name>hbase.rootdir</name>
<value>hdfs://127.0.0.1:9000/hbase</value>
</property>

<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>

</configuration>

Please note, by using this configuration you are running Hbase under Pseudo-Distributed mode. See their official docs.

Hbase Getting Started

Now start Hbase daemon,

 ~$ /opt/hbase/bin/start-hbase.sh

Most time it will work. Here is the output of jps,

 ~$ jps
1011966 NameNode
1640283 HRegionServer
1640571 JarBootstrapMain
1012248 DataNode
1640113 HMaster
1012529 SecondaryNameNode
1641814 Jps

The processes "HMaster" and "HRegionServer" are needed service by Hbase.

Finally, log into hbase by running "hbase shell" and issue a test command.

 hbase:001:0> scan 'test'
ROW COLUMN+CELL
row1 column=cf:a, timestamp=2023-02-08T10:13:39.758, value=value1
row2 column=cf:b, timestamp=2023-02-08T10:13:53.730, value=value2
row3 column=cf:c, timestamp=2023-02-08T10:14:02.778, value=value3
3 row(s)
Took 0.7276 seconds

All are doing well.