Hadoop-0.20.2下Hbase安装为了研究HBase,在Hadoop-0.20.2上安装HBase-0.90.4,结果出了很多问题。?先找了几
Hadoop-0.20.2下Hbase安装
为了研究HBase,在Hadoop-0.20.2上安装HBase-0.90.4,结果出了很多问题。
?
先找了几虚拟机练练手,配置如下:
133.133.134.116 masster
133.133.134.115 slave1
133.133.134.80 slave2
?
当然事先已经装好了hadoop-0.20.2。
?
1、官网上下载hbase-0.90.4.tar.gz后解压到master节点上。
2、修改conf下的配置文件
?
2.1 修改hbase-site.xml如下
?
?
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
?
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
?
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
?
<property>
<name>hbase.master.port</name>
<value>60000</value>
</property>
?
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1,slave2</value>
</property>
?
</configuration>
?
2.2 修改regionservers如下
slave1
slave2
?
2.3.修改hbase-env.sh
将export JAVA_HOME前#去掉,设置值
将export HBASE_MANAGES_ZK=true前#去掉
?
完成。
?
3 启动hbase
start-hbase.sh
?
结果在master上jps看到
?
root@master:~/hbase-0.90.4/conf# jps
4575 NameNode
5900 Jps
4744 SecondaryNameNode
5729 HQuorumPeer
4823 JobTracker
没有HMaster
salve节点上倒是很正常root@slave1:~/hbase-0.90.4/conf# jps4145 DataNode5312 Jps5090 HQuorumPeer5219 HRegionServer4278 TaskTracker
查找log后发现报的错是2011-10-19 21:57:34,425 FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.org.apache.hadoop.ipc.RPC$VersionMismatch: Protocol org.apache.hadoop.hdfs.protocol.ClientProtocol version mismatch. (client = 42, server = 41)at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:364)at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)
坑爹啊,版本不对,所以没启动HMaster。
好吧,明天换个版本试试。
P.S.之前安装后,进入hbase shell,输入list命令后,报错ERROR: org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect to ZooKeeper but the connection closes immediately. This could be a sign that the server has too many connections (30 is the default). Consider inspecting your ZK server logs for that error and then make sure you are reusing HBaseConfiguration as often as you can. See HTable's javadoc for more information.
解决方式是修改/etc/hosts将127.0.0.1之类的全删了,留下这样的:
133.133.134.116 master133.133.134.115 slave1 ?133.133.134.80 slave2
即可。
?