hbase的jar包要和hadoop集群的jar包一致 ,所以可能存在一个hadoop的jar包替换过程。
详细配置文件
hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://ns1/hbase</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.tmp.dir</name> <value>/opt/modules/hbase-0.98.10.1-hadoop2/data/tmp</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>hadoop-yarn1:2181,hadoop-yarn2:2181,hadoop-yarn3:2181</value> </property> </configuration>
regionservers
hadoop-yarn1 hadoop-yarn2 hadoop-yarn3
hbase-env.sh
export JAVA_HOME=/opt/modules/jdk1.6.0_24 export HBASE_CLASSPATH=/opt/modules/hadoop-2.2.0/etc/hadoop //设置hadoop的配置参数目录 export HBASE_MANAGES_ZK=false export HBASE_LOG_DIR=${HBASE_HOME}/logs //配置hbase日志目录
启动hbase集群
./start-hbase.sh 只启动master hbase-daemon.sh start master
HMmaster启动不了很可能是zookeeper上hbase znode冲突,例如重新格式化了hdfs,hbase上保存的数据不一致
hbase zkcli 连接zookeeper
hbase zkcli ls /hbase rmr /hbase quit
web访问端口:60010
其他参考文章:
http://f.dataguru.cn/thread-205027-1-1.html
本文出自 “点滴积累” 博客,请务必保留此出处http://tianxingzhe.blog.51cto.com/3390077/1711829