Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
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>
2022-12-09 14:55:21 +00:00

16 lines
2.2 KiB
HTML

<a name="mrs_01_2080"></a><a name="mrs_01_2080"></a>
<h1 class="topictitle1">Why Are Local Logs Not Deleted After YARN Is Restarted?</h1>
<div id="body1596167575148"><div class="section" id="mrs_01_2080__s9a6c6e69795c4e7aabbaa8904f3f3d11"><h4 class="sectiontitle">Question</h4><p id="mrs_01_2080__aae09afba79134ad7bd77939b06df37cb">If Yarn is restarted in either of the following scenarios, local logs will not be deleted as scheduled and will be retained permanently:</p>
<ul id="mrs_01_2080__u91ed7391bf054d2fb9639c952384c514"><li id="mrs_01_2080__l7edc5ae9f30e48cb9dddadf7a9a830a9">When Yarn is restarted during task running, local logs are not deleted.</li><li id="mrs_01_2080__l4dc3c70c8e2d4ed782f392d5e2b9cbbb">When the task is complete and logs fail to be collected, restart Yarn before the logs are cleared as scheduled. In this case, local logs are not deleted.</li></ul>
</div>
<div class="section" id="mrs_01_2080__sdd9127af28534c7d8643595fc05b2e1e"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_2080__a87127a1090564fb4af90f79f7853843d">NodeManager has a restart recovery mechanism (for details, see <a href="https://hadoop.apache.org/docs/r3.1.1/hadoop-yarn/hadoop-yarn-site/NodeManager.html#NodeManager_Restart" target="_blank" rel="noopener noreferrer">https://hadoop.apache.org/docs/r3.1.1/hadoop-yarn/hadoop-yarn-site/NodeManager.html#NodeManager_Restart</a>). Go to the <strong id="mrs_01_2080__b13279182414401">All Configurations</strong> page of Yarn by referring to <a href="mrs_01_2125.html">Modifying Cluster Service Configuration Parameters</a>. Set <span class="parmname" id="mrs_01_2080__pe996b5ae1dd84031b990c9a6b4986ed9"><b>yarn.nodemanager.recovery.enabled</b></span> of NodeManager to <span class="parmvalue" id="mrs_01_2080__pcd08c9edea584cedbdfcfd4aa78c6dd8"><b>true</b></span> to make the configuration take effect. The default value is <span class="parmvalue" id="mrs_01_2080__p0cb503dbeb594682b2209ef8be17fc56"><b>true</b></span>. In this way, redundant local logs are periodically deleted when the YARN is restarted.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_2077.html">Common Issues About Yarn</a></div>
</div>
</div>