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 "Peter Bacsko (Jira)" <ji...@apache.org> on 2020/08/26 12:53:00 UTC

[jira] [Comment Edited] (YARN-10373) Create Matchers for CS mapping rules

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

Peter Bacsko edited comment on YARN-10373 at 8/26/20, 12:52 PM:
----------------------------------------------------------------

{noformat}
public static MappingRuleMatcher createGroupMatcher(String groupName) {
   return new VariableMatcher("%primary_group", groupName);
}
{noformat}
I think it's OK to have a primary group matcher, although we won't need it right now. What we need is a matcher that matches _all_ groups for a particular user. For example:

{{g:somegroup:root.users.dev}}

This is a valid group mapping in the current code. "Somegroup" can be either the primary or supplementary group. Therefore, I suggest creating an {{AllGroupMatcher}} (or {{AllGroupMatcherForUser}}) in {{MappingRuleMatchers}} which can determine whether the submitter user belong to the group which is defined in the rule using the group mapping service.


was (Author: pbacsko):
{noformat}
public static MappingRuleMatcher createGroupMatcher(String groupName) {
   return new VariableMatcher("%primary_group", groupName);
}
{noformat}

I think it's OK to have a primary group matcher, although we won't need it right now. What we need is a matcher that matches _all_ groups. For example:

{{g:somegroup:root.users.dev}}

This is a valid group mapping in the current code. "Somegroup" can be either the primary or supplementary group. Therefore, I suggest creating an {{AllGroupMatcher}} (or {{AllGroupMatcherForUser}}) in {{MappingRuleMatchers}} which can determine whether the submitter user belong to the group which is defined in the rule using the group mapping service.

> Create Matchers for CS mapping rules
> ------------------------------------
>
>                 Key: YARN-10373
>                 URL: https://issues.apache.org/jira/browse/YARN-10373
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>            Reporter: Gergely Pollak
>            Assignee: Gergely Pollak
>            Priority: Major
>         Attachments: YARN-10373.001.patch
>
>
> As per the design document attached to the umbrella Jira (YARN-10370), we need to create the classes which represent the different ways we can decide if a mapping rule applies to an application placement. There are multiple matchers to be implemented, like user matcher, application name matcher, group matcher, catch all.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org