HBase相关参数讲解
本文介绍HBase相关参数的内容
HBase相关参数详解
-
hbase.regionserver.region.split.policy
region 分裂策略,当前有3种split策略,分别是:ConstantSizeRegionSplitPolicy,IncreasingToUpperBoundRegionSplitPolicy, KeyPrefixRegionSplitPolicy
1 ConstantSizeRegionSplitPolicy: 按固定长度分割region,固定长度取值优先获取table的”MAX_FILESIZE” 值,若没有设定该属性,则采用在hbase-site.xml中配置的hbase.hregion.max.filesize值,在0.94版本中这个值的缺省值已经被调整为:10 * 1024 * 1024 * 1024L , 也就是10G, 这个策略是0.94版本之前默认使用的,采用该策略后,当table的某一region中的某一store大小超过了预定的最大固定长度时,对该region进行split。splitPoint算法的选择还是依据“数据对半”原则,找到该region的最大store的中间长度的rowkey进行split。 2 IncreasingToUpperBoundRegionSplitPolicy: 按照region数量累增划分region,该策略为Hbase 0.94默认使用的策略,采用该策略分割的region大小是不相等的,每次新region的大小随着region数量的增多而增大。 3 KeyPrefixRegionSplitPolicy: 指定rowkey前缀位数划分region,通过读取table的prefix_split_key_policy.prefix_length属性,该属性为数字类型,表示前缀长度,在进行split时,按此长度对splitPoint进行截取。个人理解是rowkey前缀不相等,则划分region
-
hbase.hregion.max.filesize
Maximum HStoreFile size (in bytes). If any one of column family HStoreFile exceeds this value, the hosting HRegion is split into two.
-
hbase.increasing.policy.initial.size
An operation factor used in the region splitting policies of IncreasingToUpperBoundRegionSplitPolicy
-
hbase.regionserver.handler.count
RegionServer端开启的RPC监听器实例个数,也即RegionServer能够处理的IO请求线程数。默认是10. 此参数与内存息息相关。该值设置的时候,以监控内存为主要参考。对于单次请求内存消耗较高的Big PUT场景(大容量单次PUT或设置了较大cache的scan,均属于Big PUT)或ReigonServer的内存比较紧张的场景,可以设置的相对较小。对于单次请求内存消耗低,TPS(TransactionPerSecond,每秒事务处理量)要求非常高的场景,可以设置的相对大些.通常都调到100~200之间,提高regionserver性能
-
hbase.regionserver.metahandler.count
默认为50,处理meta表请求的线程数
-
hbase.hstore.compaction.timetiered.window.policy.class
-
hbase.hstore.compaction.min
默认值为 3,表示至少需要三个满足条件的store file时,minor compaction才会启动
-
hbase.hstore.blockingStoreFiles
当某一个region的storefile个数达到该值则block写入,等待compact。If more than this number of StoreFiles in any one Store (one StoreFile is written per flush of MemStore) then updates are blocked for this HRegion until a compaction is completed, or until hbase.hstore.blockingWaitTime has been exceeded.
-
hbase.hstore.compaction.kv.max
compaction过程中,每次从Hfile中读取kv的个数,越小Iops越多,How many KeyValues to read and then write in a batch when flushing or compacting. Do less if big KeyValues and problems with OOME. Do more if wide, small rows.
-
hbase.regionserver.thread.compaction.large
配置largeCompactions线程池的线程个数
-
hbase.regionserver.thread.compaction.small
配置smallCompactions线程池的线程个数,默认个数为1。
-
hfile.block.cache.size
BlockCache主要提供给读使用。读请求先到memstore中查数据,查不到就到blockcache中查,再查不到就会到磁盘上读,并把读的结果放入blockcache。由于blockcache是一个LRU,因此blockcache达到上限(heapsize * hfile.block.cache.size)后,会启动淘汰机制,淘汰掉最老的一批数据
-
hbase.hstore.compaction.max.size
表示文件大小大于该值的store file 一定会被minor compaction排除
https://blog.csdn.net/kuyuyingzi/article/details/38437185