You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Zhijie Shen (JIRA)" <ji...@apache.org> on 2014/01/04 02:02:01 UTC

[jira] [Commented] (YARN-1461) RM API and RM changes to handle tags for running jobs

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

Zhijie Shen commented on YARN-1461:
-----------------------------------

Thanks Karthik for the patch. In addition to the discussion in YARN-1399. Here're some comments on the patch.

1. How about making the two constants configurable?
{code}
+  @InterfaceStability.Evolving
+  public static final int MAX_TAGS = 10;
+  @InterfaceStability.Evolving
+  public static final int MAX_TAG_LENGTH = 25;
{code}

2. Should ApplicationSubmissionContext#newInstance have String[] tags as well? Same for ApplicationReport and GetApplicationsRequest. Or you didn't do it on purpose for sake of compatibility? If so, I'm just feeling we're going to have more newInstance methods that cannot cover all the fields the objects should have. 

3. Should we consider both case-sensitive and -insensitive, and both AND and OR logic?
{code}
+      if (tags != null && !tags.isEmpty()) {
+        Set<String> appTags = application.getTags();
+        if (appTags == null || appTags.isEmpty()) {
+          continue;
+        }
+        boolean match = false;
+        for (String tag : tags) {
+          if (appTags.contains(tag)) {
+            match = true;
+            break;
+          }
+        }
+        if (!match) {
+          continue;
+        }
+      }
{code}

4. IMHO, one useful web UI is to list  top tags (or tag cloud) on the side bar. When one tag is clicked, the applications with this tag is shown on the page. Anyway, we can deal with the new UI in a separate ticket.


> RM API and RM changes to handle tags for running jobs
> -----------------------------------------------------
>
>                 Key: YARN-1461
>                 URL: https://issues.apache.org/jira/browse/YARN-1461
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.2.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>         Attachments: yarn-1461-1.patch, yarn-1461-2.patch, yarn-1461-3.patch, yarn-1461-4.patch, yarn-1461-5.patch, yarn-1461-6.patch, yarn-1461-6.patch, yarn-1461-7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)