[ 
https://issues.apache.org/jira/browse/YARN-10381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17169159#comment-17169159
 ] 

Siddharth Ahuja edited comment on YARN-10381 at 7/31/20, 9:34 PM:
------------------------------------------------------------------

Before this change, the following REST API call to RM:

{code}
http://localhost:8088/ws/v1/cluster/apps/application_1596230988596_0001/appattempts?_=1596231029706
{code}

produced the following output:

{code}
<appAttempts>
<appAttempt>
<id>1</id>
<startTime>1596231023017</startTime>
<finishedTime>0</finishedTime>
<containerId>container_1596230988596_0001_01_000001</containerId>
<nodeHttpAddress>localhost:8042</nodeHttpAddress>
<nodeId>localhost:61871</nodeId>
<logsLink>http://localhost:8042/node/containerlogs/container_1596230988596_0001_01_000001/sidtheadmin</logsLink>
<blacklistedNodes/>
<nodesBlacklistedBySystem/>
<appAttemptId>appattempt_1596230988596_0001_000001</appAttemptId>
<exportPorts>null</exportPorts>
</appAttempt>
</appAttempts>
{code}

Notice above that there is no state element for the application attempt.

Update for this jira (my change) involves adding appAttemptState to 
AppAttemptInfo object. Tested this on single node cluster by visiting 
http://localhost:8088/ui2 and inspecting the REST API call:

{code}
http://localhost:8088/ws/v1/cluster/apps/application_1596229056065_0002/appattempts?_=1596229900909
{code}

in browser:

{code}
<appAttempts>
<appAttempt>
<id>1</id>
<startTime>1596229888259</startTime>
<finishedTime>0</finishedTime>
<containerId>container_1596229056065_0002_01_000001</containerId>
<nodeHttpAddress>localhost:8042</nodeHttpAddress>
<nodeId>localhost:54250</nodeId>
<logsLink>http://localhost:8042/node/containerlogs/container_1596229056065_0002_01_000001/sidtheadmin</logsLink>
<blacklistedNodes/>
<nodesBlacklistedBySystem/>
<appAttemptId>appattempt_1596229056065_0002_000001</appAttemptId>
<exportPorts>null</exportPorts>
<appAttemptState>RUNNING</appAttemptState>
</appAttempt>
</appAttempts>
{code}

It can be seen from above that the response contains appAttemptState which is 
RUNNING for a currently running attempt.

I did not find any specific tests for any attributes e.g. logsLink etc. 
Considering this is just a minor update, not sure if any junit testing is 
required.


was (Author: sahuja):
Added appAttemptState to AppAttemptInfo object and tested on single node 
cluster by visiting http://localhost:8088/ui2 and inspecting the REST API call:

{code}
http://localhost:8088/ws/v1/cluster/apps/application_1596229056065_0002/appattempts?_=1596229900909
{code}

in browser:

{code}
<appAttempts>
<appAttempt>
<id>1</id>
<startTime>1596229888259</startTime>
<finishedTime>0</finishedTime>
<containerId>container_1596229056065_0002_01_000001</containerId>
<nodeHttpAddress>localhost:8042</nodeHttpAddress>
<nodeId>localhost:54250</nodeId>
<logsLink>http://localhost:8042/node/containerlogs/container_1596229056065_0002_01_000001/sidtheadmin</logsLink>
<blacklistedNodes/>
<nodesBlacklistedBySystem/>
<appAttemptId>appattempt_1596229056065_0002_000001</appAttemptId>
<exportPorts>null</exportPorts>
<appAttemptState>RUNNING</appAttemptState>
</appAttempt>
</appAttempts>
{code}

It can be seen from above that the response contains appAttemptState which is 
RUNNING for a currently running attempt.

I did not find any specific tests for any attributes e.g. logsLink etc. 
Considering this is just a minor update, not sure if any junit testing is 
required.

> Send out application attempt state along with other elements in the 
> application attempt object returned from appattempts REST API call
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-10381
>                 URL: https://issues.apache.org/jira/browse/YARN-10381
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: yarn-ui-v2
>    Affects Versions: 3.3.0
>            Reporter: Siddharth Ahuja
>            Assignee: Siddharth Ahuja
>            Priority: Minor
>         Attachments: YARN-10381.001.patch
>
>
> The [ApplicationAttempts RM REST 
> API|https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_Application_Attempts_API]
>  :
> {code}
> http://rm-http-address:port/ws/v1/cluster/apps/{appid}/appattempts
> {code}
> returns a collection of Application Attempt objects, where each application 
> attempt object contains elements like id, nodeId, startTime etc.
> This JIRA has been raised to send out Application Attempt state as well as 
> part of the application attempt information from this REST API call.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to