@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class QueuePlacementRule extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QueuePlacementRule.Default
Places apps in the specified default queue.
|
static class |
QueuePlacementRule.NestedUserQueue
Places apps in queues with name of the submitter under the queue
returned by the nested rule.
|
static class |
QueuePlacementRule.PrimaryGroup
Places apps in queues by primary group of the submitter
|
static class |
QueuePlacementRule.Reject
Rejects all apps
|
static class |
QueuePlacementRule.SecondaryGroupExistingQueue
Places apps in queues by secondary group of the submitter
Match will be made on first secondary group that exist in
queues
|
static class |
QueuePlacementRule.Specified
Places apps in queues by requested queue of the submitter
|
static class |
QueuePlacementRule.User
Places apps in queues by username of the submitter
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
create |
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
QueuePlacementRule() |
Modifier and Type | Method and Description |
---|---|
String |
assignAppToQueue(String requestedQueue,
String user,
org.apache.hadoop.security.Groups groups,
Map<FSQueueType,Set<String>> configuredQueues) |
protected String |
cleanName(String name)
Replace the periods in the username or groupname with "_dot_" and
remove trailing and leading whitespace.
|
protected abstract String |
getQueueForApp(String requestedQueue,
String user,
org.apache.hadoop.security.Groups groups,
Map<FSQueueType,Set<String>> configuredQueues)
Applies this rule to an app with the given requested queue and user/group
information.
|
QueuePlacementRule |
initialize(boolean create,
Map<String,String> args)
Initializes the rule with any arguments.
|
void |
initializeFromXml(Element el) |
abstract boolean |
isTerminal()
Returns true if this rule never tells the policy to continue.
|
protected boolean create
public static final org.apache.commons.logging.Log LOG
public QueuePlacementRule initialize(boolean create, Map<String,String> args)
args
- Additional attributes of the rule's xml element other than create.public String assignAppToQueue(String requestedQueue, String user, org.apache.hadoop.security.Groups groups, Map<FSQueueType,Set<String>> configuredQueues) throws IOException
requestedQueue
- The queue explicitly requested.user
- The user submitting the app.groups
- The groups of the user submitting the app.configuredQueues
- The queues specified in the scheduler configuration.IOException
public void initializeFromXml(Element el) throws AllocationConfigurationException
AllocationConfigurationException
public abstract boolean isTerminal()
protected abstract String getQueueForApp(String requestedQueue, String user, org.apache.hadoop.security.Groups groups, Map<FSQueueType,Set<String>> configuredQueues) throws IOException
requestedQueue
- The queue specified in the ApplicationSubmissionContextuser
- The user submitting the app.groups
- The groups of the user submitting the app.IOException
Copyright © 2020 Apache Software Foundation. All rights reserved.