hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhijie Shen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-696) Enable multiple states to to be specified in Resource Manager apps REST call
Date Fri, 30 Aug 2013 21:34:52 GMT

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

Zhijie Shen commented on YARN-696:

The patch is almost good. Here's some minor comments:

1. To compare the strings with case ingored, is it better to use
+            appStates.add(state.trim().toLowerCase());
+          if (appState.contains(rmapp.getState().toString().toLowerCase())) {
It may not have much performance gain given a small string collection, but it should make
code more concise.
2. It would be more clear if the test can verify one app is ACCEPTED and the other is KILLED.
+    assertTrue("no states equal to KILLED", 
+        (array.getJSONObject(0).getString("state").equals("KILLED")) ||
+        (array.getJSONObject(1).getString("state").equals("KILLED")));
+    assertTrue("no states equal to ACCEPTED", 
+        (array.getJSONObject(0).getString("state").equals("ACCEPTED")) ||
+        (array.getJSONObject(1).getString("state").equals("ACCEPTED")));
> Enable multiple states to to be specified in Resource Manager apps REST call
> ----------------------------------------------------------------------------
>                 Key: YARN-696
>                 URL: https://issues.apache.org/jira/browse/YARN-696
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager
>    Affects Versions: 2.0.4-alpha
>            Reporter: Trevor Lorimer
>            Assignee: Trevor Lorimer
>         Attachments: YARN-696.diff, YARN-696.diff
> Within the YARN Resource Manager REST API the GET call which returns all Applications
can be filtered by a single State query parameter (http://<rm http address:port>/ws/v1/cluster/apps).

> There are 8 possible states (New, Submitted, Accepted, Running, Finishing, Finished,
Failed, Killed), if no state parameter is specified all states are returned, however if a
sub-set of states is required then multiple REST calls are required (max. of 7).
> The proposal is to be able to specify multiple states in a single REST call.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message