hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuan Gong (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1074) Clean up YARN CLI app list to show only running apps.
Date Thu, 22 Aug 2013 01:01:35 GMT

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

Xuan Gong commented on YARN-1074:

bq.The filtering for RUNNING apps shouldn't be in ClientRMService. The CLI only should do
it explicitly. If appStates is null or empty on server-side, it should return apps from all

Add null check for appTypes AND appStates on server-side(ClientRMService).
      if (!applicationTypes.isEmpty() && applicationTypes != null) {
        if (!applicationTypes.contains(application.getApplicationType())) {

      if (!applicationStates.isEmpty() && applicationStates != null) {
        if (!applicationStates.contains(application.getState().toString())) {

Also in the CLI, if the input appStates is empty, the RUNNING state will be added into the
set. And instead of send empty set of appStates to ClientRMService, we will send the set of
appStates which only include RUNNING state.
> Clean up YARN CLI app list to show only running apps.
> -----------------------------------------------------
>                 Key: YARN-1074
>                 URL: https://issues.apache.org/jira/browse/YARN-1074
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: client
>            Reporter: Tassapol Athiapinya
>            Assignee: Xuan Gong
>         Attachments: YARN-1074.1.patch, YARN-1074.2.patch, YARN-1074.3.patch
> Once a user brings up YARN daemon, runs jobs, jobs will stay in output returned by $
yarn application -list even after jobs complete already. We want YARN command line to clean
up this list. Specifically, we want to remove applications with FINISHED state(not Final-State)
or KILLED state from the result.
> {code}
> [user1@host1 ~]$ yarn application -list
> Total Applications:150
>                 Application-Id	    Application-Name	    Application-Type	      User	
    Queue	             State       Final-State	       Progress	                       Tracking-URL
> application_1374638600275_0109	           Sleep job	           MAPREDUCE	    user1	 
 default	            KILLED            KILLED	           100%	   host1:54059
> application_1374638600275_0121	           Sleep job	           MAPREDUCE	    user1	 
 default	          FINISHED         SUCCEEDED	           100%	host1:19888/jobhistory/job/job_1374638600275_0121
> application_1374638600275_0020	           Sleep job	           MAPREDUCE	    user1	 
 default	          FINISHED         SUCCEEDED	           100%	host1:19888/jobhistory/job/job_1374638600275_0020
> application_1374638600275_0038	           Sleep job	           MAPREDUCE	    user1	 
> ....
> {code}

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