gpt4 book ai didi

hadoop - 为什么我们需要编辑日志来维护HDFS中的更改

转载 作者:行者123 更新时间:2023-12-02 20:46:31 24 4
gpt4 key购买 nike

为什么我们需要调解员来记录HDFS的更改。为什么不能将更改直接写入FSimage。为什么我们需要两者之间的调解人。请帮助

最佳答案

在检查点时使用。

A typical edit ranges from 10s to 100s of bytes, but over time enough edits can accumulate to become unwieldy. A couple of problems can arise from these large edit logs. In extreme cases, it can fill up all the available disk capacity on a node, but more subtly, a large edit log can substantially delay NameNode startup as the NameNode reapplies all the edits. This is where checkpointing comes in.



检查点是一个使用fsimage并编辑日志并将其压缩为新的fsimage的过程。这样,NameNode可以直接从fsimage加载最终的内存状态,而不是重放可能无限制的编辑日志。这是非常有效的操作,并减少了NameNode启动时间。

但是,创建新的fsimage是I / O和CPU密集型操作,有时需要几分钟才能执行。在检查点期间,名称系统还需要限制其他用户的并发访问。因此,HDFS不会暂停 Activity 的NameNode来执行检查点,而是将其推迟到SecondaryNameNode或Standby NameNode,具体取决于是否配置了NameNode高可用性。检查点的机制因是否配置了NameNode高可用性而有所不同。我们将同时介绍这两者。

阅读 link了解更多详细信息

关于hadoop - 为什么我们需要编辑日志来维护HDFS中的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47806486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com