<?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: Using yarn logs command in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285971#M212122</link>
    <description>&lt;P&gt;Hey great suggestion ! I think this might work.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2019 02:55:09 GMT</pubDate>
    <dc:creator>Daggers</dc:creator>
    <dc:date>2019-12-19T02:55:09Z</dc:date>
    <item>
      <title>Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285632#M211942</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I try and get the logs for an application like this:&lt;/P&gt;
&lt;P&gt;yarn logs -applicationId application_1575531060741_10424&lt;/P&gt;
&lt;P&gt;The command fails because I am not running it as the application owner.&amp;nbsp; I need to run it like this:&lt;/P&gt;
&lt;P&gt;yarn logs -applicationId application_1575531060741_10424 -appOwner hive&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is I want to write out all the yarn logs to the os so I can ingest them into splunk.&amp;nbsp; If I try and figure out the appOwner for each application then this is awkward and time consuming even in a script.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a better way to dump all the yarn logs to the os ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 03:56:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285632#M211942</guid>
      <dc:creator>Daggers</dc:creator>
      <dc:date>2019-12-16T03:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285634#M211944</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/21919"&gt;@Daggers&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you can try this -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Below properties decides the path for storing yarn logs in hdfs -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Belos is sample example from my cluster -

yarn.nodemanager.remote-app-log-dir = /app-logs
yarn.nodemanager.remote-app-log-dir-suffix = logs-ifile&lt;/LI-CODE&gt;&lt;P&gt;2. You can do "hadoop dfs -copyToLocal" for above path which will copy all applications to local and then you can pass to splunk ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think that can work for you?&lt;/P&gt;&lt;P&gt;Let me know if you have more questions on above.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 03:40:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285634#M211944</guid>
      <dc:creator>sagarshimpi</dc:creator>
      <dc:date>2019-12-16T03:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285645#M211954</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/21919"&gt;@Daggers&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also check for HDFS NFS gateway which will allow hdfs filesystem to mount on local OS exposed via NFS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/r2.8.0/hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html" target="_blank"&gt;https://hadoop.apache.org/docs/r2.8.0/hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 06:55:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285645#M211954</guid>
      <dc:creator>sagarshimpi</dc:creator>
      <dc:date>2019-12-16T06:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285971#M212122</link>
      <description>&lt;P&gt;Hey great suggestion ! I think this might work.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 02:55:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285971#M212122</guid>
      <dc:creator>Daggers</dc:creator>
      <dc:date>2019-12-19T02:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285972#M212123</link>
      <description>&lt;P&gt;I wonder if there is a way to ensure that all the files have finished being written to /tmp/log (The location at my site of &lt;SPAN&gt;yarn.nodemanager.remote-app-log-dir&lt;/SPAN&gt;) before I copy them ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 02:59:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285972#M212123</guid>
      <dc:creator>Daggers</dc:creator>
      <dc:date>2019-12-19T02:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285974#M212124</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/21919"&gt;@Daggers&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can write simple script using yarn rest api to fetch only completed applications [month/daywise] and copy only those applications from hdfs to local. Please check below link -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html" target="_blank"&gt;https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yarnrestapi.PNG" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25776i84F9719B03B004A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yarnrestapi.PNG" alt="yarnrestapi.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 03:44:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285974#M212124</guid>
      <dc:creator>sagarshimpi</dc:creator>
      <dc:date>2019-12-19T03:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using yarn logs command</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285987#M212135</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/21919"&gt;@Daggers&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please feel free to select best answer if your questions are answered to close the thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 06:37:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Using-yarn-logs-command/m-p/285987#M212135</guid>
      <dc:creator>sagarshimpi</dc:creator>
      <dc:date>2019-12-19T06:37:27Z</dc:date>
    </item>
  </channel>
</rss>

