cloudera垃圾检查点间隔配置

2guxujil  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(405)

cloudera允许我配置fs.trash.interval。
但它不允许我配置fs.trash.checkpoint.interval。
那么hdfs什么时候创建一个检查点呢?
这里有一个类似的问题没有回答:hadoop框架什么时候在垃圾箱中创建一个检查点(expunge)到它的“当前”目录?

uinbv5nw

uinbv5nw1#

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 ,这就是它创建垃圾检查点的频率。
这个 fs.trash.checkpoint.interval 配置属性是在ApacheHadoop2.x发行版中引入的。较旧的版本不支持此配置属性,您可以认为该行为等同于 fs.trash.checkpoint.interval 等于 fs.trash.interval .

相关问题