HBase-1.2.1 cluster building

Keywords: Big Data HBase Zookeeper Java xml

1.hbase is a distributed system, which needs to rely on HDFS as the storage medium and zookeeper to complete the monitoring of the master-slave nodes.

2. Installation preparation is as follows:

1.HBase role
 HMaster (master node, one Active, one StandBy)
Hreginserver (data node, multiple)
2. dependence
 HDFS cluster, zookeeper cluster [start]

3. Upload the installation package and decompress it

tar -zxvf hbase-1.2.1.bin.tar.gz -C apps/

4. Enter the conf directory to modify the configuration file as follows

1.vi hbase-env.sh
export JAVA_HOME=/usr/local/java/jdk1.8.0_231
export HBASE_MANAGES_ZK=false #Own zookeeper, do not start its built-in
2.vi hbase-site.xml
	<configuration>
		<!-- Appoint hbase stay HDFS Path stored on -->
        <property>
                <name>hbase.rootdir</name>
                <value>hdfs://hadoop01:9000/hbase</value>
        </property>
		<!-- Appoint hbase It's distributed -->
        <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
        </property>
		<!-- Appoint zk Address, multiple“,"Division -->
        <property>
                <name>hbase.zookeeper.quorum</name> <value>hadoop01:2181,hadoop02:2181,hadoop03:2181</value>
        </property>
        <!-- Appoint hbase Monitoring page port of -->
        <property>
                <name>hbase.master.info.port</name>
                <value>60010</value>
        </property>
	</configuration>

3.vi regionservers
hadoop01
hadoop02
hadoop03

5. Copy to other machines

scp -r hbase-1.2.1/ hadoop02:$PWD
scp -r hbase-1.2.1/ hadoop03:$PWD

6. Check whether hdfs and zookeeper are started before starting

# 1. Start one by one
bin/hbase-daemon.sh start master
bin/hbase-daemon.sh start regionserver

# 2. Start it all and remember the same time. An error will occur if you do not synchronize.
bin/start-hbase.sh  

# 3. To enable the standby master, you only need to execute it on another machine
bin/hbase-daemon.sh start master

# 3. Hadoop 01:16010 you can view the web page

7. The command-line client experience is enough, which is usually accessed by java program

cd bin/hbase
bin/hbase shell
>status
>Building watches and so on...

8.java client

slightly

Posted by upnxwood16 on Fri, 27 Mar 2020 07:23:00 -0700