伪分布式安装hbase-0.99.2

伪分布式安装hbase-0.99.2


1、准备工作
安装环境:hadoop-2.6.0
解压hbase-0.99.2-bin.tar.gz
进入目录hbase-0.99.2


2、配置:


2.1、vi hbase-0.99.2/conf/hbase-site.xml
添加以下配置


<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>


<property>
<name>hbase.rootdir</name>
<value>hdfs://lsn-linux:9000/hbase</value>   //注意端口号,为hadoop中core-site.xml的fs.default.name配置的端口
</property>


<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>//hadoop/hadoop-2.6.0/zookdata</value>   //要在系统中创建该文件夹
</property>


2.2、vi hbase-0.99.2/conf/hbase-env.sh 
添加以下配置


export JAVA_HOME=/usr/java/jdk1.7.0_21     //jdk路径
export HBASE_CLASSPATH=/hadoop/hadoop-2.6.0/hbase-0.99.2/conf   //hbase解压路径的./conf
export HBASE_MANAGES_ZK=true    //打开hbase自带的zookeeper,不用再自行安装


3、启动
先启动hadoop
/hadoop/hadoop-2.6.0/sbin/start-all.sh
[root@lsn-linux hadoop-2.6.0]# jps
3385 Jps
3343 NodeManager
2849 NameNode
3252 ResourceManager
2965 DataNode
3109 SecondaryNameNode


再启动hbase
hbase-0.99.2/bin/start-hbase.sh
[root@lsn-linux hadoop-2.6.0]# jps
4039 HRegionServer
3850 HQuorumPeer
3343 NodeManager
2849 NameNode
3916 HMaster
3252 ResourceManager
2965 DataNode
4544 Jps
3109 SecondaryNameNode


4、启动hbase shell命令
hbase-0.99.2/bin/hbase shell  


[root@lsn-linux hadoop-2.6.0]# hbase-0.99.2/bin/hbase shell          
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.99.2, r6a0c4f3bae1e92109393423472bd84097f096e75, Tue Dec  2 20:47:47 PST 2014


hbase(main):001:0> list
TABLE                                                                           
0 row(s) in 1.8960 seconds


=> []
hbase(main):002:0> 






5、问题总结


5.1、hbase shell命令出现SLF4J: Class path contains multiple SLF4J bindings.错误
hbase(main):001:0> list
TABLE                                                                           
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/hadoop/hadoop-2.6.0/hbase-0.99.2/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/hadoop/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]


原因:slf4j-log4j12-1.7.7.jar文件冲突,将其移到上一级即可
mv /hadoop/hadoop-2.6.0/hbase-0.99.2/lib/slf4j-log4j12-1.7.7.jar /hadoop/hadoop-2.6.0/hbase-0.99.2/


5.2、hbase shell命令出现ERROR: Can't get master address from ZooKeeper; znode data == null 错误
原因:hbase-site.xml缺少hbase.zookeeper.property.dataDir配置,并需在系统中创建


<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>//hadoop/hadoop-2.6.0/zookdata</value>   //要在系统中创建该文件夹
</property>


5.3、启动hbase报localhost: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".错误
查看日志Call From lsn-linux/182.168.8.110 to lsn-linux:9090 failed on connection exception: java.net.ConnectException: Connection refused; 
原因:1、hdfs端服务有问题。2、hbase-site.xml配置有问题。
查看datanode没启动,停止服务stop-all.sh,删除hadoop.tmp.dir路径的内容,格式化namenode,启动服务解决。





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值