分享

初学hbase不能正常运行

395455030 发表于 2015-12-24 12:55:36 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 8400
    看到有的教程用到了hadoop、zookeeper,我初学时不想牵扯到那么多软件,就想知道单hbase的用法,文件就存储在本地系统上,hbase里面也集成了zookeeper吧,就不用外部的zookeeper了。
    我将hbase.rootdir指向了file:///mnt/hgfs/VMshared/hbase-1.1.2/testuser,刚开始用create、list、put、scan都可用,后面竟然出问题了。
    1、运行hbase shell会报org.apache.zookeeper.KeeperException$ConnectionLossException。
    2、虽然报了这个意外但还是能进入hbase shell,输create 'test2', 'cf'后报client.ConnectionManager$HConnectionImplementation: Can't get connection to ZooKeeper。是不是没开zookeeper?怎么开?我第一次用也没开什么zookeeper怎么就没问题?需要开zookeeper吗,我看一些教程都没说要开zookeeper啊。我想了下比之前多做的改动,就是添加了HADOOP_HOME环境变量,再把HADOOP_HOME去掉后也还是不行。
    3、jps看一下,start-hbase.sh后会开一个HMaster,是否还应该有HQuorumPeer、regionserver?hbase shell后会再多一个Main。
    4、HMaster虽然启动了,但是发现几分钟后会自动关闭,怎么回事?
    5、用hbase-daemon.sh start zookeeper开启zookeeper后就开不了HMaster了,hbase-root-master-master.out文件说Could not start ZK at requested port of 2181.ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
    6、此时在hbase shell执行create、ls命令,报The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
    现在要做的是简单的单机单hbase测试,创建表格,并显示所创建的内容。

已有(2)人评论

跳转到指定楼层
arsenduan 发表于 2015-12-24 13:55:55
  我将hbase.rootdir指向了file:///mnt/hgfs/VMshared/hbase-1.1.2/testuser,刚开始用create、list、put、scan都可用,后面竟然出问题了,最好使用hdfs.

这有篇文档,希望对楼主有所帮助。




链接:http://pan.baidu.com/s/1bn3COEF 密码:oprm

来自

hadoop2.6 hbase0.99.2伪分布式环境搭建
http://www.aboutyun.com/thread-15767-1-1.html

回复

使用道具 举报

arsenduan 发表于 2015-12-24 13:58:14


建议完全分布式,推荐文档
hbase 0.96整合到hadoop2.2三个节点全分布式安装高可靠文档
http://www.aboutyun.com/thread-7746-1-1.html


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条