您的位置:首页 > 运维架构

Hbase安装及参数说明

2017-09-02 17:03 393 查看
1.启动hadoop

start-all.sh


2.获取并解压HBase安装包

tar -zxvf hbase-0.98.9-hadoop2-bin.tar.gz
cd hbase-0.98.9-hadoop2


3.配置conf中的文件

(1)配置hbase-env.sh(修改下面环境语句的路径)

export JAVA_HOME=/usr/local/java/jdk1.7.0_71/


(2)配置hbase-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://cloud01:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>cloud01,cloud02,cloud03</value>
</property>
</configuration>


(3)配置regionservers

cloud02
cloud03


(4)配置系统文件

sudo gedit /etc/profile


添加配置并生效:

export HBASE_HOME=/home/hduser/hbase-0.98.9-hadoop2
export PATH=$HBASE_HOME/bin:$PATH
export HADOOP_CLASSPATH=$HBASE_HOME/lib/*


source /etc/profile


(5)分别拷贝至从节点

cd
scp -r hbase-0.98.9-hadoop2 cloud01:~/
scp -r hbase-0.98.9-hadoop2 cloud02:~/


(6)在每个从节点重复上面步骤(4)

(7)在cloud01启动hbase

bin/start-hbse.sh


4.配置参数说明:

hbase.regionserver.handler.count


RegionServer接收客户端的请求。

默认值:10

hbase.hregion.max.filesize


在当前ReigonServer上单个Reigon的最大存储空间,单个Region超过该值时,这个Region会被自动split成更小的region。

默认值:256M

hbase.regionserver.global.memstore.upperLimit
hbase.regionserver.global.memstore.lowerLimit


RegionServer中所有memstore所占java虚拟机的比例。

默认值:0.4/0.35

hbase.hstore.blockingStoreFiles


在compact时,如果一个Store(Coulmn Family)内有超过7个storefile需要合并,则block所有的写请求,进行compact,限制storefile数量增长过快。

默认值:7

hbase.hstore.compaction.min


最少多少个文件可以进行minor compact。默认值:5

hbase.hstore.compaction.max


minor compact一次最多合并多少个文件。默认值:10

hbase.store.compaction.ratio


文件选取中的比例。默认值:1.2

hbase.hstore.compaction.min.size


任何小于这个大小(字节数)的HFile会被自动选为合并对象

hbase.hstore.compaction.max.size


任何大于这个大小(字节数)的HFile会被自动排除作为合并对象

hfile.block.cache.size


RegionServer的blockcach大小

默认值:0.25

hbase.hregion.memstore.flush.size


Hregion中MemStore的大小

默认值: 128M

hbase.hregion.majorcompaction


默认值:86400000 毫秒
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hbase hadoop