大数据之hdfs详解之五:垃圾回收站剖析

首先需要明白一点,现在linux系统好像没有回收站的说法了,所以在删除别人的文件或文件夹之前一定要慎重,毕竟rm命令是高危命令,删除了就没有了,所以对于高危命令,我们要保持敬畏之心.

hdfs在部署的时候默认垃圾回收站是禁用的,因此hdfs是可以开启垃圾回收站的。

先看看官网对回收站的解释:
第一个参数:fs.trash.interval=0 表示禁用

Number of minutes after which the checkpoint gets deleted. If zero,the trash feature is disabled. This option may be configured both on the server and the client. If trash is disabled server side then the client side configuration is checked. If trash is enabled on the server side then the value configured on the server is used and the client configuration value is ignored.

也就是说将fs.trash.interval的值表示检查点被删除之前的分钟数。 如果为零,则禁用垃圾箱功能。 可以在服务器和客户端上配置此选项。 如果在服务器端禁用垃圾,则检查客户端配置。 如果在服务器端启用了垃圾箱,则使用服务器上配置的值,并忽略客户端配置值。
那么可以按照生产上的需求设置回收站的保存时间,这个时间以分钟为单位,例如1440=24h=1天。

第二个参数:fs.trash.checkpoint.interval:0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值