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

Sandy Ryza commented on YARN-1387:
----------------------------------

A few stylistic comments.  Otherwise, looks good to me.

{code}
+  public GetApplicationsResponse getApplications(
+        GetApplicationsRequest request, boolean caseSensitive)
+    throws YarnException {
+        UserGroupInformation callerUGI;
     try {
{code}
Fix indentation here.  "throws" should be level with GetApplicationsRequest and 
the following line should be level with the try.

{code}
+      if (users != null && !users.isEmpty()) {
+        if (!users.contains(application.getUser())) {
+          continue;
+        }
+      }
{code}
For brevity, can we consolidate these into single if statements like the 
previous code did?

{code}
+  long limit = Long.MAX_VALUE;
{code}
limit can be an int, right?  I don't think the RM will ever be returning more 
than 2 billion apps.



> RMWebServices should use ClientRMService for filtering applications
> -------------------------------------------------------------------
>
>                 Key: YARN-1387
>                 URL: https://issues.apache.org/jira/browse/YARN-1387
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: api
>    Affects Versions: 2.2.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>         Attachments: yarn-1387-1.patch, yarn-1387-2.patch
>
>
> YARN's REST API allows filtering applications, this should be moved to 
> ClientRMService to allow Java API also support the same functionality.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to