hadoop集羣(徹底分佈式)下hbase的安裝和配置

hadoop的安裝請看http://www.cnblogs.com/zhangmin1987/p/8808711.htmlhtml

1、Hbase簡介前端

Apache HBase™是Hadoop數據庫,這是一個分佈式,可擴展的大數據存儲node

當您須要隨機,實時讀取/寫入您的大數據時使用Apache HBase™。該項目的目標是託管很是大的表 - 數十億行×數百萬列 - 在商品硬件集羣上。Apache HBase是一個開源的,分佈式的,版本化的非關係數據庫,其模型是在Chang等人的Google Bigtable:結構化數據分佈式存儲系統以後創建的就像Bigtable利用Google文件系統提供的分佈式數據存儲同樣,Apache HBase在Hadoop和HDFS之上提供了相似Bigtable的功能linux

截取官網的一些內容以下,官網地址 shell

Welcome to Apache HBase™

Apache HBase™ is the Hadoop database, a distributed, scalable, big data store.數據庫

Use Apache HBase™ when you need random, realtime read/write access to your Big Data. This project's goal is the hosting of very large tables -- billions of rows X millions of columns -- atop clusters of commodity hardware. Apache HBase is an open-source, distributed, versioned, non-relational database modeled after Google's Bigtable: A Distributed Storage System for Structured Data by Chang et al. Just as Bigtable leverages the distributed data storage provided by the Google File System, Apache HBase provides Bigtable-like capabilities on top of Hadoop and HDFS.apache

Features-特性

  • Linear and modular scalability.
  • Strictly consistent reads and writes.
  • Automatic and configurable sharding of tables
  • Automatic failover support between RegionServers.
  • Convenient base classes for backing Hadoop MapReduce jobs with Apache HBase tables.
  • Easy to use Java API for client access.
  • Block cache and Bloom Filters for real-time queries.
  • Query predicate push down via server side Filters
  • Thrift gateway and a REST-ful Web service that supports XML, Protobuf, and binary data encoding options
  • Extensible jruby-based (JIRB) shell
  • Support for exporting metrics via the Hadoop metrics subsystem to files or Ganglia; or via JMX

2、下載ruby

Download-下載地址

Click here to download Apache HBase™.session

 

3、Hbase的參考指南app

 

Apache HBase™參考指南 

你們能夠仔細看下這個指南,包括了安裝說明和適配說明以及數據庫的模型和具體特性。

貼一下Hbase對JDK的適配性:

 

3、環境準備

三臺linux-cent0s6.5機器

機器1 192.168.234.129 master 主機

機器2 192.168.234.130 node1 主機

機器3 192.168.234.131 node2 主機 

 

4、安裝

 4.1 下載

下載請看二或者用wget 命令

4.2 安裝

[root@master local]# ls /local/hadoop-3.1.0.tar.gz 
/local/hadoop-3.1.0.tar.gz
[root@master local]# tar -zxvf /local/hadoop-3.1.0.tar.gz

將解壓後的文件mv到/opt/下。

[root@master hbase]# pwd
/opt/hbase

而後配置/etc/profile

內容以下

#hbase config
export HBASE_HOME=/opt/hbase
export PATH=$HBASE_HOME/bin:$PATH
"/etc/profile" 91L, 2237C written
[root@master ~]# source /etc/profile

 

4.3 habse配置

配置三個文件:

1) 配置hbase-env.sh

默認狀況下hbase自帶的zookeeper配置是被註釋掉的,表明着當啓動hbase的時候它會再一次啓動hbase自帶的zookeeper,這個時候會報錯,端口被佔用。

因此這裏修改爲

export HBASE_MANAGES_ZK=false

2)配置/opt/hbase/conf/hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase/hbase_db</value>
    </property>
    <property>
        <name>hbase.master</name>
        <value>master</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>master,node1,node2</value>
    </property>
    <property>
        <name>zookeeper.session.timeout</name>
        <value>60000000</value>
    </property>
    <property>
        <name>dfs.support.append</name>
        <value>true</value>
    </property>
</configuration>

3) 配置regionservers 

[root@master conf]# cat regionservers 
node1
node2

4)集羣安裝:

配置完之後將hbase整個目錄和/etc/profile所有copy到node1和node2. (略)

和hadoop和zookeeper的複製相似,請參看http://www.cnblogs.com/zhangmin1987/p/8808711.html

複製完之後記得source

 

 4.4 啓動

1)啓動順序: zookeeper--hadoop--hbase

啓動zookeeper和hadoop請參看前2篇文章 http://www.cnblogs.com/zhangmin1987/p/8808711.html 和 http://www.cnblogs.com/zhangmin1987/p/8818426.html

啓動hbase

[root@master bin]# pwd
/opt/hbase/bin
[root@master bin]# ./start-hbase.sh 
starting master, logging to /opt/hbase/logs/hbase-root-master-master.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
node2: starting regionserver, logging to /opt/hbase/bin/../logs/hbase-root-regionserver-node2.out
node1: starting regionserver, logging to /opt/hbase/bin/../logs/hbase-root-regionserver-node1.out
node2: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
node2: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
node1: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
node1: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0

 2)jps驗證

[root@master bin]# jps
9856 Jps
9584 HMaster
2931 NameNode
3306 ResourceManager
2731 QuorumPeerMain
[root@master bin]#

3)前端驗證

hdfs

http://192.168.234.129:50070/dfshealth.html#tab-startup-progress

 

yarn

http://192.168.234.129:8088/cluster/nodes

hbase

http://192.168.234.129:16010/master-status

相關文章
相關標籤/搜索