forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
16 lines
2.0 KiB
HTML
16 lines
2.0 KiB
HTML
<a name="mrs_01_1699"></a><a name="mrs_01_1699"></a>
|
|
|
|
<h1 class="topictitle1">Why Data in the Buffer Is Lost If a Power Outage Occurs During Storage of Small Files</h1>
|
|
<div id="body1597735019868"><div class="section" id="mrs_01_1699__s874be7dc05624b8e908f9bf300d8f74a"><h4 class="sectiontitle">Question</h4><p id="mrs_01_1699__a731bf6e5a2864678af70ebe43e1faa89">Why data in the buffer is lost if a power outage occurs during storage of small files?</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1699__sff1240399862417fb13286737f1b53fe"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1699__ac90a61597c9744c283142e2c140a0670">Because of a power outage, the blocks in the buffer are not written to the disk immediately after the write operation is completed. To enable synchronization of blocks to the disk, set <span class="parmname" id="mrs_01_1699__pc887c6f2c5e74f33a546bd0c6ac5d6db"><b>dfs.datanode.synconclose</b></span> to <span class="parmvalue" id="mrs_01_1699__p2de144f57e934353a083554db848d76f"><b>true</b></span> in the <span class="filepath" id="mrs_01_1699__ff1ead4f7ecd34bae9da7b128d5d712dd"><b>hdfs-site.xml</b></span> file.</p>
|
|
<p id="mrs_01_1699__af1b4ae0b1e1f4cbcbc66025f05ff4407">By default, <span class="parmname" id="mrs_01_1699__p7fa187110ed2400cb5e01c9c45bccd56"><b>dfs.datanode.synconclose</b></span> is set to <span class="parmvalue" id="mrs_01_1699__pd1c079f7818b45e3beda7cd448fe5138"><b>false</b></span>. This improves the performance but can cause a buffer data loss in the case of a power outage, and therefore, it is recommended that <span class="parmname" id="mrs_01_1699__p9f43668eab734b3a924156eb9e824d4b"><b>dfs.datanode.synconclose</b></span> be set to <span class="parmvalue" id="mrs_01_1699__p603178ac64074fb0b947d77f011f3b58"><b>true</b></span> even if this may affect the performance. You can determine whether to enable the synchronization function based on your actual situation.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1690.html">FAQ</a></div>
|
|
</div>
|
|
</div>
|
|
|