如何自动化Hadoop垃圾清理 [英] How To Automate Hadoop Trash Cleanup

查看:1041
本文介绍了如何自动化Hadoop垃圾清理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过运行 hadoop fs -expunge
清除我的用户文件夹下的垃圾桶。这样可以清除比 fs.trash.interval 值。是否有一个清除自动发生恢复磁盘空间?

I can clear trash under my user folder by running hadoop fs -expunge This gets rid of files that are older than the fs.trash.interval value. Is there a for expunge to happen automatically to recover diskspace?

另外,我在运行expunge时看到以下输出

Also I see the following output when I run expunge

[cloudera @ localhost conf] $ hadoop fs -expunge
14/07/17 15:43:54信息fs.TrashPolicyDefault:Namenode垃圾配置:删除间隔= 1分钟,Emptier间隔= 0分钟。

空载程序间隔为0,这表示自动清理已关闭。这个值在哪里配置?

The emptier interval is 0 which suggests that automated clean up is turned off. Where is this value configured?

推荐答案

代码表明它被称为 fs.trash.interval

编辑:对不起,误解了这个问题。

Sorry, misunderstood the question.

此处,在那里我们可以看到相关常量似乎是 FS_TRASH_CHECKPOINT_INTERVAL_KEY

The emptier implementation itself is here, where we can see the relevant constant seems to be FS_TRASH_CHECKPOINT_INTERVAL_KEY.

展望此处揭示关键是 fs.trash.checkpoint.interval

编辑:最后找到了xml conf条目此处

Finally found the xml conf entry here.

这篇关于如何自动化Hadoop垃圾清理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆