public class UserGroupMappingPlacementRule extends PlacementRule
Modifier and Type | Class and Description |
---|---|
static class |
UserGroupMappingPlacementRule.QueueMapping |
Modifier and Type | Field and Description |
---|---|
static String |
CURRENT_USER_MAPPING |
static String |
PRIMARY_GROUP_MAPPING |
Constructor and Description |
---|
UserGroupMappingPlacementRule(boolean overrideWithQueueMappings,
List<UserGroupMappingPlacementRule.QueueMapping> newMappings,
org.apache.hadoop.security.Groups groups) |
Modifier and Type | Method and Description |
---|---|
String |
getQueueForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc,
String user)
Get queue for a given application
|
List<UserGroupMappingPlacementRule.QueueMapping> |
getQueueMappings() |
getName, initialize
public static final String CURRENT_USER_MAPPING
public static final String PRIMARY_GROUP_MAPPING
public UserGroupMappingPlacementRule(boolean overrideWithQueueMappings, List<UserGroupMappingPlacementRule.QueueMapping> newMappings, org.apache.hadoop.security.Groups groups)
public String getQueueForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc, String user) throws org.apache.hadoop.yarn.exceptions.YarnException
PlacementRule
getQueueForApp
in class PlacementRule
asc
- application submission contextuser
- userNamenon-null value means it is determined
null value means it is undetermined, so next PlacementRule
in the PlacementManager
will take care
org.apache.hadoop.yarn.exceptions.YarnException
- if any error happenspublic List<UserGroupMappingPlacementRule.QueueMapping> getQueueMappings()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.