[ https://issues.apache.org/jira/browse/YARN-10386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17186087#comment-17186087 ]
Peter Bacsko edited comment on YARN-10386 at 8/27/20, 8:15 PM: --------------------------------------------------------------- Some examples: {{u:%user:%user}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "user", "fallbackResult": "placeDefault" } } {noformat} {{u:%user:root.dev.%primary_group.%user}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "primaryGroupUser", "parentQueue": "root.dev", "fallbackResult": "placeDefault" } } {noformat} {{u:%user:%secondary_group.%user}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "secondaryGroupUser", "fallbackResult": "placeDefault" } } {noformat} {{u:%user:root.users}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "setDefaultQueue", "value": "root.users", "fallbackResult": "skip" }, { "type": "user", "matches": "*", "policy": "defaultQueue", "fallbackResult": "placeDefault" } } {noformat} As we can see, we need two rules for a hard-coded path like "root.users". This might look weird, but this very similar to FS, where the rule is also called {{<default>}} with an overridden default queue. So in theory it's the same. This is also an alternative for {{u:%user:root.users}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "custom", "customPlacement": "root.users" } } {noformat} was (Author: pbacsko): Some examples: {{u:%user:%user}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "user", "fallbackResult": "placeDefault" } } {noformat} {{u:%user:root.dev.%primary_group.%user}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "primaryGroupUser", "parentQueue": "root.dev", "fallbackResult": "placeDefault" } } {noformat} {{u:%user:%secondary_group.%user}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "secondaryGroupUser", "fallbackResult": "placeDefault" } } {noformat} {{u:%user:root.users}} {noformat} "rules": { { "type": "user", "matches": "*", "policy": "setDefaultQueue", "value": "root.users", "fallbackResult": "skip" }, { "type": "user", "matches": "*", "policy": "defaultQueue", "fallbackResult": "placeDefault" } } {noformat} As we can see, we need two rules for a hard-coded path like "root.users". This might look weird, but this very similar to FS, where the rule is also called {{<default>}} with an overridden default queue. So in theory it's the same. > Create new JSON schema for Placement Rules > ------------------------------------------ > > Key: YARN-10386 > URL: https://issues.apache.org/jira/browse/YARN-10386 > Project: Hadoop YARN > Issue Type: Sub-task > Components: capacity scheduler, capacityscheduler > Reporter: Peter Bacsko > Assignee: Peter Bacsko > Priority: Major > Attachments: MappingRulesDescription_v1.json, YARN-10386-001.patch, > YARN-10386-002.patch, YARN-10386-003.patch, YARN-10386-004.patch, > YARN-10386-005.patch, YARN-10386-006.patch, YARN-10386-007.patch, > YARN-10386-008.patch > > > Tasks in this JIRA: > # Create new JSON schema > # Add Maven plugin which generates Java POJOs based on the schema > # Add helper class which essentially does the same as #2 (for dev purposes) -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org