【原因】
当/hbase/WALs中的HLog文件被持久化到存储文件中,且这些Hlog日志文件不再被需要时,就会被转移到{hbase.rootdir}/oldWALs目录下,该目录由HMaster上的定时任务负责定期清理。
HMaster在做定期清理的时候首先会检查zookeeper中/hbase/replication/rs下是否有对应的复制文件,如果有就放弃清理,如果没有就清理对应的hlog。在手动清理oldWALs目录数据的同时,如果没有删除对应的znode数据,就会导致HMaster不会自动清理oldWALs。另附某网友的解答:
The folder gets cleaned regularly by a chore in master. When a WAL file is not needed any more for recovery purposes (when HBase can guaratee HBase has flushed all the data in the WAL file), it is moved to the oldWALs folder for archival. The log stays there until all other references to the WAL file are finished. There is currently two services which may keep the files in the archive dir. First is a TTL process, which ensures that the WAL files are kept at lea
HBase oldWALs过大清理策略与解决方案

HBase中的oldWALs目录在不再需要HLog文件时会被移到这里,通常由HMaster定时清理。如果oldWALs占用过大,可以通过设置`hbase.master.logcleaner.ttl`配置属性减少保留时间,或确保`hbase.replication`和`hbase.backup.enable`为false来避免复制和备份导致的占用。在Ambari中添加`hbase.backup.enable=false`并重启集群可以有效清理oldWALs。
最低0.47元/天 解锁文章
3265

被折叠的 条评论
为什么被折叠?



