cloudera垃圾检查点间隔配置

时间:2017-01-25 01:03:49

标签: hadoop hdfs cloudera

Cloudera允许我配置fs.trash.interval。

但它不允许我配置fs.trash.checkpoint.interval。

那么hdfs什么时候创建一个检查点?

这里存在类似的问题而没有回应: When does Hadoop Framework creates a checkpoint (expunge) to its "current" directory in trash?

1 个答案:

答案 0 :(得分:1)

Apache Hadoop文档包含左侧导航到各种* -default.xml文件的链接。这些文件包含所有配置属性的默认设置。

如果单击* -default.xml链接,网站会在漂亮的打印表格中显示它们。以下是core-site.xml讨论垃圾邮件属性的原始XML版本。

<property>
  <name>fs.trash.interval</name>
  <value>0</value>
  <description>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.
  </description>
</property>

<property>
  <name>fs.trash.checkpoint.interval</name>
  <value>0</value>
  <description>Number of minutes between trash checkpoints.
  Should be smaller or equal to fs.trash.interval. If zero,
  the value is set to the value of fs.trash.interval.
  Every time the checkpointer runs it creates a new checkpoint 
  out of current and removes checkpoints created more than 
  fs.trash.interval minutes ago.
  </description>
</property>

根据此说明,如果您没有更改fs.trash.checkpoint.interval,则它使用的值与fs.trash.interval相同,并且创建垃圾检查点的频率是多少。

Apache Hadoop 2.x版本行中引入了fs.trash.checkpoint.interval配置属性。旧版本不支持此配置属性,您可以认为该行为等同于fs.trash.checkpoint.interval等于fs.trash.interval