<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Can someone explain what the yarn local and log dirs do? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327772#M230141</link>
    <description>&lt;P&gt;The localized log directory of an application will be found in&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ {yarn.nodemanager.log-dirs}/application_${appid}&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Individual containers will have their log directories in directories named &lt;STRONG&gt;container_{$contid}&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Each container dir will contain&amp;nbsp;&lt;STRONG&gt;stderr&lt;/STRONG&gt;, &lt;STRONG&gt;stdin&lt;/STRONG&gt;, and &lt;STRONG&gt;syslog&lt;/STRONG&gt; generated by that particular container.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Oct 2021 23:17:45 GMT</pubDate>
    <dc:creator>Faizan_Ali</dc:creator>
    <dc:date>2021-10-15T23:17:45Z</dc:date>
    <item>
      <title>Can someone explain what the yarn local and log dirs do?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327575#M230095</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I just wanted to confirm my understanding or help me better understand the yarn local and log dirs.&lt;/P&gt;&lt;P&gt;So my understanding is that yarn will download the data locally to a filesystem so that it is more easily accessible when a job is run as well as logs for that particular application. I believe these are temporary files as they will be stored in HDFS after the job completes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@test01 log]# ll /hadoop/yarn/&lt;BR /&gt;total 0&lt;BR /&gt;drwxr-xr-x. 6 yarn hadoop 78 Oct 13 08:09 local&lt;BR /&gt;drwxrwxr-x. 8 yarn hadoop 239 Oct 13 08:09 log&lt;/P&gt;&lt;P&gt;Can someone please help confirm my understanding or help me better understand this concept?&lt;/P&gt;&lt;P&gt;Also what is usually best practice in regards to mounting these directories onto a local filesystem or onto another hard drive or can I have this directory share a hard drive with one of the datanode directories?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 13:15:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327575#M230095</guid>
      <dc:creator>ryu</dc:creator>
      <dc:date>2021-10-13T13:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain what the yarn local and log dirs do?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327772#M230141</link>
      <description>&lt;P&gt;The localized log directory of an application will be found in&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ {yarn.nodemanager.log-dirs}/application_${appid}&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Individual containers will have their log directories in directories named &lt;STRONG&gt;container_{$contid}&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Each container dir will contain&amp;nbsp;&lt;STRONG&gt;stderr&lt;/STRONG&gt;, &lt;STRONG&gt;stdin&lt;/STRONG&gt;, and &lt;STRONG&gt;syslog&lt;/STRONG&gt; generated by that particular container.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 23:17:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327772#M230141</guid>
      <dc:creator>Faizan_Ali</dc:creator>
      <dc:date>2021-10-15T23:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain what the yarn local and log dirs do?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327775#M230142</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92806"&gt;@Faizan_Ali&lt;/a&gt;&amp;nbsp;for the explanation.&lt;/P&gt;&lt;P&gt;So in other words, once the job completes, then these logs will be stored in HDFS, or where are the logs stored after the application job is completed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are the local and log yarn dirs are only for temporary use, usually when a job runs in the hadoop cluster?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Sat, 16 Oct 2021 00:59:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327775#M230142</guid>
      <dc:creator>ryu</dc:creator>
      <dc:date>2021-10-16T00:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain what the yarn local and log dirs do?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327787#M230153</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;yarn application -list&lt;/STRONG&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is the command that will list only the applications that are either&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;in&amp;nbsp;&lt;STRONG&gt;submitted&lt;/STRONG&gt;&lt;/SPAN&gt;,&amp;nbsp;&lt;STRONG&gt;running&amp;nbsp;&lt;/STRONG&gt;or&amp;nbsp;&lt;STRONG&gt;accepted&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;state.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;There is a log aggregation that collects each container's logs and moves these logs onto the directory configured in&amp;nbsp;&lt;STRONG&gt;yarn.nodemanager.remote-app-log-dir&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;only after the completion of the application. So the &lt;STRONG&gt;applicationId&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;listed by the command isn't completed yet and the logs are not yet collected and this is why you cant see the logs.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;**TO ENABLE LOG AGGREGATION:**&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Log aggregation is enabled in the &lt;STRONG&gt;yarn-site.xml&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;file. The&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;yarn.log-aggregation-enable&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;property enables log aggregation for running applications.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&amp;lt;property&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;yarn.log-aggregation-enable&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;lt;/property&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Use this command&amp;nbsp;&lt;STRONG&gt;yarn logs -applicationId &amp;lt;application ID&amp;gt;&amp;nbsp;&lt;/STRONG&gt;to view the logs of the application once it gets completed.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;To list all finished applications use &lt;STRONG&gt;yarn application -list -appstates FINISHED&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;To list all the applications&amp;nbsp;&lt;STRONG&gt;yarn application -list -appstates ALL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sat, 16 Oct 2021 12:38:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327787#M230153</guid>
      <dc:creator>Faizan_Ali</dc:creator>
      <dc:date>2021-10-16T12:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain what the yarn local and log dirs do?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327790#M230156</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92806"&gt;@Faizan_Ali&lt;/a&gt;&amp;nbsp;Thanks for the explanation.&lt;/P&gt;&lt;P&gt;Makes sense.&lt;BR /&gt;So while an application is running, it logs the container logs into a local directory "&lt;STRONG&gt;$ {yarn.nodemanager.log-dirs}/application_${appid}"&amp;nbsp;&lt;/STRONG&gt;then after the application is completed, it aggregates the logs into&amp;nbsp;&lt;STRONG&gt;yarn.nodemanager.remote-app-log-dir.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok thanks for the explanation.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Oct 2021 16:00:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-someone-explain-what-the-yarn-local-and-log-dirs-do/m-p/327790#M230156</guid>
      <dc:creator>ryu</dc:creator>
      <dc:date>2021-10-16T16:00:36Z</dc:date>
    </item>
  </channel>
</rss>

