http://hbase.apache.org/
通过lib目录下的hadoop-core- ...jar可以看出适配的hadoop版本
hbase-0.98.6-hadoop2 => hadoop 2.2 hbase-0.96.2-hadoop2 => hadoop 2.2 hbase-0.98.6-hadoop1 => hadoop 1.2.1 hbase-0.96.2-hadoop1 => hadoop 1.2.1
在单点模式的基础上继续
编辑hbase-env.sh 增加HBASE_CLASSPATH环境变量
编辑hbase-site.xml打开分布模式
覆盖hadoop核心jar包
启动hbase
验证启动
hbase-env.sh
#用于帮助hbase找到hadoop export HBASE_CLASSPATH=/home/hadoop/hadoop-1.2.1/conf
hbase-site.xml
<property> <name>hbase.rootdir</name> <value>file://home/hadoop/hbase/data</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property>
覆盖hadoop核心jar包
这是关键一步, 主要目的是防止因为hbase和hadoop版本不同步出现兼容问题, 造成hmaster启动异常
[hadoop@hadoop1 hbase]$ ./bin/start-hbase.sh localhost: starting zookeeper, logging to /home/hadoop/hbase/bin/../logs/hbase-hadoop-zookeeper-hadoop1.out starting master, logging to /home/hadoop/hbase/bin/../logs/hbase-hadoop-master-hadoop1.out localhost: starting regionserver, logging to /home/hadoop/hbase/bin/../logs/hbase-hadoop-regionserver-hadoop1.out [hadoop@hadoop1 hbase]$ jps 2474 SecondaryNameNode 2552 JobTracker 3692 HMaster 3893 Jps 3636 HQuorumPeer 3823 HRegionServer 2334 NameNode [hadoop@hadoop1 hbase]$
本文出自 “晓风残月” 博客,请务必保留此出处http://kinda22.blog.51cto.com/2969503/1582573
原文地址:http://kinda22.blog.51cto.com/2969503/1582573