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

Konstantinos Karanasos commented on YARN-8013:
----------------------------------------------

Thanks again for working on this, [~cheersyang].

Patch looks mostly fine, but from a quick look it feels that the 
AllocationTagsManager exposes a bit too much information at the moment. So we 
have the {{getApplicationIdToTags}} method that returns all existing 
applications and their tags (which can be too many). Then we create 
{{TargetApplications}} with all this information, although I think the nsScope 
is given, right?

Why not have a method inside the tags manager that takes an nsScope and returns 
only the target applications for that nsScope, rather than exposing all this?

It seems that this will simplify the code of {{TargetApplications}} too.

Other than that, a couple of minor things:
 * AllocationTagNamespace is a slightly misleading name, as it does not reveal 
that it essentially defines the applications to which a constraint will refer
 * When defining {{getApplicationIdToTags}}: 
perAppNodeMappings.keySet().contains() -> perAppNodeMappings.containsKey()

> Support APP-TAG namespace for allocation tags
> ---------------------------------------------
>
>                 Key: YARN-8013
>                 URL: https://issues.apache.org/jira/browse/YARN-8013
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>            Priority: Major
>         Attachments: YARN-8013.001.patch, YARN-8013.002.patch, 
> YARN-8013.003.patch, YARN-8013.004.patch
>
>
> YARN-1461 adds *Application Tag* concept to Yarn applications, user is able 
> to annotate application with multiple tags to classify apps. We can leverage 
> this to represent a namespace for a certain group of apps. So instead of 
> calling *app-label*, propose to call it *app-tag*.
> A typical use case is,
> There are a lot of TF jobs running on Yarn, and some of them are consuming 
> resources heavily. So we want to limit number of PS on each node for such BIG 
> players but ignore those SMALL ones. To achieve this, we can do following 
> steps:
>  # Add application tag "big-tf" to these big TF jobs
>  # For each PS request, we add "ps" source tag and map it to constraint 
> "{color:#d04437}notin, node, tensorflow/ps{color}" or 
> "{color:#d04437}cardinality, node, tensorflow/ps{color}{color:#d04437}, 0, 
> 2{color}" for finer grained controls.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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