<?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: Issue when Querying YARN application information via REST API in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Issue-when-Querying-YARN-application-information-via-REST/m-p/158809#M29043</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3009/sonhaiha.html" nodeid="3009"&gt;@Son Hai Ha&lt;/A&gt; &lt;/P&gt;&lt;P&gt;From this apache jira - &lt;A href="https://issues.apache.org/jira/browse/YARN-3978" target="_blank"&gt;https://issues.apache.org/jira/browse/YARN-3978&lt;/A&gt;, we can see that they have configuration option to turn off saving of non-AM container metadata. In order to have non-AM container details, we need to set "yarn.timeline-service.generic-application-history.save-non-am-container-meta-info" and "yarn.timeline-service.generic-application-history.enabled" to TRUE and restart RM and ATS.&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2016 02:44:32 GMT</pubDate>
    <dc:creator>ssathish</dc:creator>
    <dc:date>2016-05-24T02:44:32Z</dc:date>
    <item>
      <title>Issue when Querying YARN application information via REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Issue-when-Querying-YARN-application-information-via-REST/m-p/158808#M29042</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have a problem when querying the job info via the REST api. In the past, when I need to see the list of containers that are created for one specific job, I can query it like below and  it shows me all the container information.&lt;/P&gt;&lt;PRE&gt;curl -XGET &lt;A href="http://svr02.spo:8188/ws/v1/applicationhistory/apps/application_1445602639127_0365/appattempts/appattempt_1445602639127_0365_000001/containers" target="_blank"&gt;http://svr02.spo:8188/ws/v1/applicationhistory/apps/application_1445602639127_0365/appattempts/appattempt_1445602639127_0365_000001/containers&lt;/A&gt;
{"container":[
{
  "containerId":"container_e68_1445602639127_0365_01_000003",
  "allocatedMB":2048,
  "allocatedVCores":1,
  "assignedNodeId":"svr15.spo:45454",
  "priority":10,
  "startedTime":1446131587303,
  "finishedTime":1446131593180,
  "elapsedTime":5877,
  "diagnosticsInfo":"Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n",
  "logUrl":"http://svr02.spo:8188/applicationhistory/logs/svr15.spo:45454/container_e68_1445602639127_0365_01_000003/container_e68_1445602639127_0365_01_000003/annemarie",
  "containerExitStatus":-105,
  "containerState":"COMPLETE",
  "nodeHttpAddress":"http://svr15.spo:8042"
},
{
  "containerId":"container_e68_1445602639127_0365_01_000002",
  "allocatedMB":2048,
  "allocatedVCores":1,
  "assignedNodeId":"svr12.spo:45454",
  "priority":20,
  "startedTime":1446131578209,
  "finishedTime":1446131586479,
  "elapsedTime":8270,
  "diagnosticsInfo":"Container killed by the ApplicationMaster.\nContainer killed on request. Exit code is 143\nContainer exited with a non-zero exit code 143\n",
  "logUrl":"http://svr02.spo:8188/applicationhistory/logs/svr12.spo:45454/container_e68_1445602639127_0365_01_000002/container_e68_1445602639127_0365_01_000002/annemarie",
  "containerExitStatus":-105,
  "containerState":"COMPLETE",
  "nodeHttpAddress":"http://svr12.spo:8042"
},
{
  "containerId":"container_e68_1445602639127_0365_01_000001",
  "allocatedMB":1024,
  "allocatedVCores":1,
  "assignedNodeId":"svr04.spo:45454",
  "priority":0,
  "startedTime":1446131572596,
  "finishedTime":1446131599631,
  "elapsedTime":27035,
  "diagnosticsInfo":"",
  "logUrl":"http://svr02.spo:8188/applicationhistory/logs/svr04.spo:45454/container_e68_1445602639127_0365_01_000001/container_e68_1445602639127_0365_01_000001/annemarie",
  "containerExitStatus":0,
  "containerState":"COMPLETE",
  "nodeHttpAddress":"http://svr04.spo:8042"
}]} 
&lt;/PRE&gt;&lt;P&gt;However, later, when I use the same query, the response only displays the information of ONE and ONLY ONE container: the application master. The other container information disappears mythically:&lt;/P&gt;&lt;PRE&gt;curl -XGET &lt;A href="http://svr02.spo:8188/ws/v1/applicationhistory/apps/application_1445602639127_0365/appattempts/appattempt_1445602639127_0365_000001/containers" target="_blank"&gt;http://svr02.spo:8188/ws/v1/applicationhistory/apps/application_1445602639127_0365/appattempts/appattempt_1445602639127_0365_000001/containers&lt;/A&gt;
{"container":[
{
  "containerId":"container_e68_1445602639127_0365_01_000001",
  "allocatedMB":1024,
  "allocatedVCores":1,
  "assignedNodeId":"svr04.spo:45454",
  "priority":0,
  "startedTime":1446131572596,
  "finishedTime":1446131599631,
  "elapsedTime":27035,
  "diagnosticsInfo":"",
  "logUrl":"http://svr02.spo:8188/applicationhistory/logs/svr04.spo:45454/container_e68_1445602639127_0365_01_000001/container_e68_1445602639127_0365_01_000001/annemarie",
  "containerExitStatus":0,
  "containerState":"COMPLETE",
  "nodeHttpAddress":"http://svr04.spo:8042"
}
]
} 
 &lt;/PRE&gt;&lt;P&gt;Does anyone have the same problem or experience this before? I really need to see the list of container information because I would like to query its starttime and endtime.&lt;/P&gt;&lt;P&gt;Thank you for your help!!&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 15:13:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Issue-when-Querying-YARN-application-information-via-REST/m-p/158808#M29042</guid>
      <dc:creator>hasonhai</dc:creator>
      <dc:date>2016-05-20T15:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue when Querying YARN application information via REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Issue-when-Querying-YARN-application-information-via-REST/m-p/158809#M29043</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3009/sonhaiha.html" nodeid="3009"&gt;@Son Hai Ha&lt;/A&gt; &lt;/P&gt;&lt;P&gt;From this apache jira - &lt;A href="https://issues.apache.org/jira/browse/YARN-3978" target="_blank"&gt;https://issues.apache.org/jira/browse/YARN-3978&lt;/A&gt;, we can see that they have configuration option to turn off saving of non-AM container metadata. In order to have non-AM container details, we need to set "yarn.timeline-service.generic-application-history.save-non-am-container-meta-info" and "yarn.timeline-service.generic-application-history.enabled" to TRUE and restart RM and ATS.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 02:44:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Issue-when-Querying-YARN-application-information-via-REST/m-p/158809#M29043</guid>
      <dc:creator>ssathish</dc:creator>
      <dc:date>2016-05-24T02:44:32Z</dc:date>
    </item>
  </channel>
</rss>

