这篇文章给大家分享的是有关hbase-1.1.3基于hadoop-2.6.2 ha分布式部署的示例分析的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
集群说明
hadoop-2.5.2采用ha方式部署,所有namenode是hdfs://masters,zookeeper地址:bi3:2181,bi4:2181,bi5:2181
IP | 主机名 | 部署 |
192.168.2.10 | bi10 | hadoop-2.6.2,HMaster,HRegionServer |
192.168.2.12 | bi12 | hadoop-2.6.2,HMaster,HRegionServer |
192.168.2.13 | bi13 | hadoop-2.6.2 |
Hbase-1.1.3部署
解压habse-1.1.3到/home/hadoop/work/hbase-1.1.3
修改conf/hbase-env.sh,需要HBASE_CLAsspATH=hadoop配置文件位置,否则hbase不能识别hdfs://masters/hbase这种namenode ha的配置方式。
# The java implementation to use. Java 1.7+ required. export JAVA_HOME=/home/hadoop/work/jdk1.7.0_75 # Extra Java CLAsspATH elements. Optional. export HBASE_CLAsspATH=/home/hadoop/work/hadoop-2.6.2/etc/hadoop # Tell HBase whether it should manage it's own instance of Zookeeper or not. export HBASE_MANAGES_ZK=false
修改conf/hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://masters/hbase</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.master</name> <value>60000</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>bi3:2181,bi4:2181,bi5:2181</value> </property> <property> <name>hbase.client.write.buffer</name> <value>20971520</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/hadoop/work/hbase-1.1.3/zookeeper/</value> </property> <property> <name>hbase.tmp.dir</name> <value>/home/hadoop/work/hbase-1.1.3/tmp/</value> </property> </configuration>
修改conf/regionservers
bi10 bi12
#init hbase_environment export HBASE_HOME=/home/hadoop/work/hbase-1.1.3 export PATH=$PATH:$HBASE_HOME/bin
启动habse
在bi10上启动habse
[hadoop@bi10 hbase-1.1.3]$ start-hbase.sh starting master, logging to /home/hadoop/work/hbase-1.1.3/logs/hbase-hadoop-master-bi10.out bi12: starting regionserver, logging to /home/hadoop/work/hbase-1.1.3/bin/../logs/hbase-hadoop-regionserver-bi12.out bi10: starting regionserver, logging to /home/hadoop/work/hbase-1.1.3/bin/../logs/hbase-hadoop-regionserver-bi10.out
在bi12上启动另一个HMaster
[hadoop@bi12 hbase-1.1.3]$ hbase-daemon.sh start master starting master, logging to /home/hadoop/work/hbase-1.1.3/logs/hbase-hadoop-master-bi12.out
看下进程,两台主机都应该有HRegionServer,HMaster就对了
感谢各位的阅读!关于“hbase-1.1.3基于hadoop-2.6.2 ha分布式部署的示例分析”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!