Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install HBase

Shulou Source: shulou.com Published: 2022-06-01 02:13:03 09月22日 Update

Editor to share with you how to install HBase, I hope you will get something after reading this article. Let's discuss it together.

1. Installation instructions

L Zookeeper3.4.5 cluster deployed (192.168.210.95\ 192.168.210.86 deployment manual see zookeeper installation manual)

L Hbase version number 0.96.1

L operating system Red HatEnterprise Linux Server release 5.5 (Tikanga)

two。 Installation steps

1) download HBase0.96.1,hbase-0.96.1-hadoop2-bin.tar.gz, official website address: hbase.apache.org

2) upload to server 210.95, directory: / home/sun

3) decompress: tar-xvf hbase-0.96.1-hadoop2-bin.tar.gz, decompress the MV directory: / home/sun/hbase

4) add configuration item: / etc/profile

Export HBASE_HOME=/home/sun/hbase

Export PATH=$PATH HBASE_HOME/bin

5) modify / home/sun/hbase/conf/hbase-env.sh

ExportJAVA_HOME=/usr/local/java/jdk1.7.0_45

Export HBASE_MANAGES_ZK=false (set to FALSE here to use your own configured zookeeper cluster)

6) modify / home/sun/hbase/conf/regionservers and add the corresponding regionserver

7) modify / home/sun/hbase/conf/hbase-site.xml

Hbase.master

Namenode:6000

Hbase.rootdir

Hdfs://namenode:9000/hbase

Hbase.cluster.distributed

True

Hbase.zookeeper.property.clientPort

2181

Hbase.zookeeper.quorum

Namenode,datanode002

8) replace the relevant HADOOPJAR package under / home/sun/hbase/lib with version 2.2

9) start zookeeper first, and then start hbase:cd/home/sun/hbase/bin,. / start-hbase.sh

10) check the startup log to make sure there are no errors, and check it on 95 and 86 by jps.

11) http://192.168.210.95:60010/master-statusHBASE MASTER Monitoring Page

12) http://192.168.210.86:60030/rs-statusHBASE REGIONSERVER Monitoring Page

PS: an error occurred while running HBASE, indicating the existence of multiple SELF4J versions of the JAR package, resulting in an error. Delete two JAR of SELF4J in the FLUME LIB package.

3. Test HBase

1) enter the HBase directory and start HBase: cd / home/sun/hbase/bin

2). / start-hbase.sh

3) start hbase shell: hbase shell

4) View status status

5) create a table: create 'warn','id','clientid','clientname'

6) View all tables: list

7) number of rows in the statistical table: count 'warn'

4. Question supplement

HRegionServer hangs up on Datanode001 and an exception is reported: org.apache.zookeeper.KeeperException$SessionExpiredException:KeeperErrorCode = Session expired. The error in the foreground is displayed as: ERROR: java.io.IOException: Table Namespace Manager not ready yet,try again later:

Add to / home/sun/hbase/conf/hbase-env.sh:

Export HBASE_OPTS= "$HBASE_OPTS-verbose:gc-XX:+HeapDumpOnOutOfMemoryError-XX:+UseConcMarkSweepGC-XX:+CMSParallelRemarkEnabled-XX:+UseParNewGC

-XX:CMSInitiatingOccupancyFraction=70 "

Add to / home/sun/hbase/conf/hbase-site.xml:

Zookeeper.session.timeout

90000

Hbase.regionserver.restart.on.zk.expire

True

After reading this article, I believe you have a certain understanding of "how to install HBase". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Tags: Errors versions directories manuals articles clusters pages monitoring configuration operating system two front desk address multiple done log more server step status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Huawei Xiaomi Docker Linux