<?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: detecting yarn job failure in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/detecting-yarn-job-failure/m-p/172678#M45929</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2302/arunpoy.html" nodeid="2302"&gt;@ARUN&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can redirect console output to some file --&amp;gt; grep application ID from that output file --&amp;gt; use yarn command get the job information&lt;/P&gt;&lt;P&gt;#Run job&lt;/P&gt;&lt;PRE&gt;[hdfs@prodnode1 ~]$ /usr/hdp/current/hadoop-client/bin/hadoop jar /usr/hdp/current/hadoop-mapreduce-client/hadoop-mapreduce-examples-2.7.1.2.4.2.0-258.jar pi 10 10 1&amp;gt;/tmp/op 2&amp;gt;/tmp/op &amp;amp;&lt;/PRE&gt;&lt;P&gt;#Grep Application ID&lt;/P&gt;&lt;PRE&gt;[hdfs@prodnode1 ~]$ grep 'Submitted application' /tmp/op |rev|cut -d' ' -f1|rev
application_1478509018160_0003
[hdfs@prodnode1 ~]$&lt;/PRE&gt;&lt;P&gt;#Get status&lt;/P&gt;&lt;PRE&gt;[hdfs@prodnode1 ~]$ yarn application -status application_1478509018160_0003
16/11/11 13:06:07 INFO impl.TimelineClientImpl: Timeline service address: &lt;A href="http://prodnode3.openstacklocal:8188/ws/v1/timeline/" target="_blank"&gt;http://prodnode3.openstacklocal:8188/ws/v1/timeline/&lt;/A&gt;
16/11/11 13:06:07 INFO client.RMProxy: Connecting to ResourceManager at prodnode3.openstacklocal/172.26.74.211:8050
Application Report :
Application-Id : application_1478509018160_0003
Application-Name : QuasiMonteCarlo
Application-Type : MAPREDUCE
User : hdfs
Queue : default
Start-Time : 1478869426329
Finish-Time : 1478869463505
Progress : 100%
State : FINISHED
Final-State : SUCCEEDED
Tracking-URL : &lt;A href="http://prodnode3.openstacklocal:19888/jobhistory/job/job_1478509018160_0003" target="_blank"&gt;http://prodnode3.openstacklocal:19888/jobhistory/job/job_1478509018160_0003&lt;/A&gt;
RPC Port : 42357
AM Host : prodnode1.openstacklocal
Aggregate Resource Allocation : 129970 MB-seconds, 228 vcore-seconds
Log Aggregation Status : SUCCEEDED
Diagnostics :
[hdfs@prodnode1 ~]$&lt;/PRE&gt;&lt;P&gt;Hope this information helps! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2016 21:06:33 GMT</pubDate>
    <dc:creator>KuldeepK</dc:creator>
    <dc:date>2016-11-11T21:06:33Z</dc:date>
    <item>
      <title>detecting yarn job failure</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/detecting-yarn-job-failure/m-p/172677#M45928</link>
      <description>&lt;P&gt;I am trying to run a yarn job from a shell script. IF the job fails i should makethe control flow in my script accordingly. IS there a way to get the application id of the submitted job and check it status and proceed further.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 12:52:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/detecting-yarn-job-failure/m-p/172677#M45928</guid>
      <dc:creator>arunpoy</dc:creator>
      <dc:date>2016-11-11T12:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: detecting yarn job failure</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/detecting-yarn-job-failure/m-p/172678#M45929</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2302/arunpoy.html" nodeid="2302"&gt;@ARUN&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can redirect console output to some file --&amp;gt; grep application ID from that output file --&amp;gt; use yarn command get the job information&lt;/P&gt;&lt;P&gt;#Run job&lt;/P&gt;&lt;PRE&gt;[hdfs@prodnode1 ~]$ /usr/hdp/current/hadoop-client/bin/hadoop jar /usr/hdp/current/hadoop-mapreduce-client/hadoop-mapreduce-examples-2.7.1.2.4.2.0-258.jar pi 10 10 1&amp;gt;/tmp/op 2&amp;gt;/tmp/op &amp;amp;&lt;/PRE&gt;&lt;P&gt;#Grep Application ID&lt;/P&gt;&lt;PRE&gt;[hdfs@prodnode1 ~]$ grep 'Submitted application' /tmp/op |rev|cut -d' ' -f1|rev
application_1478509018160_0003
[hdfs@prodnode1 ~]$&lt;/PRE&gt;&lt;P&gt;#Get status&lt;/P&gt;&lt;PRE&gt;[hdfs@prodnode1 ~]$ yarn application -status application_1478509018160_0003
16/11/11 13:06:07 INFO impl.TimelineClientImpl: Timeline service address: &lt;A href="http://prodnode3.openstacklocal:8188/ws/v1/timeline/" target="_blank"&gt;http://prodnode3.openstacklocal:8188/ws/v1/timeline/&lt;/A&gt;
16/11/11 13:06:07 INFO client.RMProxy: Connecting to ResourceManager at prodnode3.openstacklocal/172.26.74.211:8050
Application Report :
Application-Id : application_1478509018160_0003
Application-Name : QuasiMonteCarlo
Application-Type : MAPREDUCE
User : hdfs
Queue : default
Start-Time : 1478869426329
Finish-Time : 1478869463505
Progress : 100%
State : FINISHED
Final-State : SUCCEEDED
Tracking-URL : &lt;A href="http://prodnode3.openstacklocal:19888/jobhistory/job/job_1478509018160_0003" target="_blank"&gt;http://prodnode3.openstacklocal:19888/jobhistory/job/job_1478509018160_0003&lt;/A&gt;
RPC Port : 42357
AM Host : prodnode1.openstacklocal
Aggregate Resource Allocation : 129970 MB-seconds, 228 vcore-seconds
Log Aggregation Status : SUCCEEDED
Diagnostics :
[hdfs@prodnode1 ~]$&lt;/PRE&gt;&lt;P&gt;Hope this information helps! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 21:06:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/detecting-yarn-job-failure/m-p/172678#M45929</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2016-11-11T21:06:33Z</dc:date>
    </item>
  </channel>
</rss>

