首页 > 代码库 > Hbase集群搭建
Hbase集群搭建
JDK版本和HBASE对应关系
HBase Version | JDK 6 | JDK 7 | JDK 8 |
2 | Not Supported | Not Supported | yes |
1.3 | Not Supported | yes | yes |
1.2 | Not Supported | yes | yes |
1.1 | Not Supported | yes | Running with JDK 8 will work but is not well tested. |
1 | Not Supported | yes | Running with JDK 8 will work but is not well tested. |
0.98 | yes | yes | Running with JDK 8 works but is not well tested. Building with JDK 8 would require removal of the deprecated remove() method of thePoolMap class and is under consideration. See HBASE-7608 for more information about JDK 8 support. |
0.94 | yes | yes | N/A |
Hadoop和HBASE对应关系
HBase-0.94.x | HBase-0.98.x (Support for Hadoop 1.1+ is eprecated.) |
HBase-1.0.x (Hadoop 1.x is NOT supported) | HBase-1.1.x | HBase-1.2.x | HBase-1.3.x | |
Hadoop-1.0.x | X | X | X | X | X | X |
Hadoop-1.1.x | S | NT | X | X | X | X |
Hadoop-0.23.x | S | X | X | X | X | X |
Hadoop-2.0.x-alpha | NT | X | X | X | X | X |
Hadoop-2.1.0-beta | NT | X | X | X | X | X |
Hadoop-2.2.0 | NT | S | NT | NT | X | X |
Hadoop-2.3.x | NT | S | NT | NT | X | X |
Hadoop-2.4.x | NT | S | S | S | S | S |
Hadoop-2.5.x | NT | S | S | S | S | S |
Hadoop-2.6.0 | X | X | X | X | X | X |
Hadoop-2.6.1+ | NT | NT | NT | NT | S | S |
Hadoop-2.7.0 | X | X | X | X | X | X |
Hadoop-2.7.1+ | NT | NT | NT | NT | S | S |
Hadoop version support matrix
"S" = supported "X" = not supported "NT" = Not tested
我们这里选用的软件版本如下
Hadoop 2.7.1
Hbase hbase-1.2.4
jdk1.8.0_101
第一步,从apache基金会下载最新版本
第一步,从apache基金会下载最新版本
https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/1.2.4/hbase-1.2.4-bin.tar.gz
第二步,解压到服务器
tar -zxvf hbase-1.2.4
第三步,配置hbase集群,要修改3个文件(首先zk集群已经安装好了)
注意:由于hbase最终数据存放到hdfs,故需要把hadoop的hdfs-site.xml和core-site.xml 放到hbase/conf下
1.在master 上修改hbase-env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_101
//告诉hbase使用外部的zk,如果使用内部的zk,设置为true(单机伪分布式)
export HBASE_MANAGES_ZK=false
# The maximum amount of heap to use. Default is left to JVM default. export HBASE_HEAPSIZE=8G
2.修改hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://node1:9000/hbase</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>node1:2181,node2:2181,node3:2181</value> </property> </configuration>
3.指定机器为regionserver,不单独指定master。其中:在哪个机器上启动,哪台就是master,在regionservers文件说明要启动的HRegionServer
vim regionservers node1 node2 node3 node4
第四步,拷贝配置好的hbase文件到其他节点
第五步:
1.启动所有的hbase
分别启动zk
./zkServer.sh start
启动hdfs集群
start-dfs.sh
启动hbase,在主节点上运行:
start-hbase.sh
6.通过浏览器访问hbase1.2.4版本管理页面
node1:16010(于0.98 版本不同)
7.为保证集群的可靠性,要启动多个HMaster(可选)
hbase-daemon.sh start master
Hbase集群搭建
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。