This is article 35 in the Big Data series. Complete HBase distributed cluster deployment on three-node Hadoop + ZooKeeper cluster.
Complete illustrated version: CSDN Original | Juejin
Cluster Planning
Three-node cluster deployment:
| Node | Role |
|---|---|
| h121 | HMaster, RegionServer |
| h122 | RegionServer |
| h123 | HMaster (backup), RegionServer |
Configuration Steps
1. Modify hbase-env.sh
On all nodes, configure JDK path and ZooKeeper management:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_MANAGES_ZK=FALSE
2. Modify hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://h121.wzk.icu:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>h121.wzk.icu,h122.wzk.icu,h123.wzk.icu</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
3. Configure regionservers
Create regionservers file:
h121.wzk.icu
h122.wzk.icu
h123.wzk.icu
4. Configure backup masters
Create backup-masters file:
h123.wzk.icu
5. Sync to All Nodes
Use xsync to distribute configuration to all nodes.
Start and Verify
# Start HBase cluster
start-hbase.sh
# Check processes
jps
Expected: HMaster on h121, RegionServer on all three nodes.
High Availability
With backup HMaster on h123, if h121 HMaster fails, h123 automatically takes over.