HBase compaction行为及触发条件

HBase compaction come in two varieties: minor and major.

for the minor:

将最新的几个小文件合成一个大文件。

何时合并行为发生?

当文件满足下面所有条件时,合并行为将发生:

1> 参与合并的文件个数 >= hbase.hstore.compaction.min (default is 3), 但最多不超过hbase.hstore.compaction.max(default is 10)

2> 参与合并的文件需满足的条件: 

文件大小 < hbase.hstore.compaction.max.size (default is Long.MAX_VALUE)

且,文件大小 < 所有创建日期比该文件大(新)的文件大小之和*1.2

文件大小 < hbase.hstore.compactoin.min.size(memstore flush size)

3> 文件选择的优先级

优先考虑老文件。

for the major:

将所有文件合并

Which compaction type is run is automatically determined when the compaction

check is executed。 The check is triggered either after a memstore has been flushed to

disk, after the compact or major_compact shell commands or corresponding API calls

have been invoked, or by a background thread.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值