1、集群环境
Hadoop HA 集群规划
hadoop1 cluster1 nameNode HMaster
hadoop2 cluster1 nameNodeStandby ZooKeeper ResourceManager HMaster
hadoop3 cluster2 nameNode ZooKeeper
hadoop4 cluster2 nameNodeStandby ZooKeeper ResourceManagerStandBy
hadoop5 DataNode NodeManager HRegionServer
hadoop6 DataNode NodeManager HRegionServer
hadoop7 DataNode NodeManager HRegionServer
2、安装
版本:版本为hbase-0.99.2-bin.tar
解压配置环境变量
export HBASE_HOME=/home/hadoop/apps/hbase
export PATH=$PATH:$HBASE_HOME/bin
配置文件:在conf目录中加入core-site.xml,hdfs-site.xml文件,该文件保持和hadoop的配置文件一致
3、详细配置文件
core-site.xml 和当前hadoop集群的配置文件保持一致
1 <?xml version="1.0" encoding="UTF-8"?> 2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 3 <!-- 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. See accompanying LICENSE file. 15 --> 16 17 <!-- Put site-specific property overrides in this file. --> 18 19 <configuration> 20 <property> 21 <name>fs.defaultFS</name> 22 <value>hdfs://cluster1</value> 23 </property> 24 <property> 25 <name>hadoop.tmp.dir</name> 26 <value>/home/hadoop/hadoop/tmp</value> 27 </property> 28 <property> 29 <name>ha.zookeeper.quorum</name> 30 <value>hadoop2:2181,hadoop3:2181,hadoop4:2181</value> 31 </property> 32 </configuration>