@InterfaceAudience.Private @InterfaceStability.Unstable public class QueuePlacementPolicy extends Object
Constructor and Description |
---|
QueuePlacementPolicy(List<QueuePlacementRule> rules,
Map<FSQueueType,Set<String>> configuredQueues,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
String |
assignAppToQueue(String requestedQueue,
String user)
Applies this rule to an app with the given requested queue and user/group
information.
|
static QueuePlacementRule |
createAndInitializeRule(Node node)
Create and initialize a rule given a xml node
|
static QueuePlacementPolicy |
fromConfiguration(org.apache.hadoop.conf.Configuration conf,
Map<FSQueueType,Set<String>> configuredQueues)
Build a simple queue placement policy from the allow-undeclared-pools and
user-as-default-queue configuration options.
|
static QueuePlacementPolicy |
fromXml(Element el,
Map<FSQueueType,Set<String>> configuredQueues,
org.apache.hadoop.conf.Configuration conf)
Builds a QueuePlacementPolicy from an xml element.
|
List<QueuePlacementRule> |
getRules() |
public QueuePlacementPolicy(List<QueuePlacementRule> rules, Map<FSQueueType,Set<String>> configuredQueues, org.apache.hadoop.conf.Configuration conf) throws AllocationConfigurationException
AllocationConfigurationException
public static QueuePlacementPolicy fromXml(Element el, Map<FSQueueType,Set<String>> configuredQueues, org.apache.hadoop.conf.Configuration conf) throws AllocationConfigurationException
AllocationConfigurationException
public static QueuePlacementRule createAndInitializeRule(Node node) throws AllocationConfigurationException
node
- AllocationConfigurationException
public static QueuePlacementPolicy fromConfiguration(org.apache.hadoop.conf.Configuration conf, Map<FSQueueType,Set<String>> configuredQueues)
public String assignAppToQueue(String requestedQueue, String user) throws IOException
requestedQueue
- The queue specified in the ApplicationSubmissionContextuser
- The user submitting the appIOException
- If an exception is encountered while getting the user's groupspublic List<QueuePlacementRule> getRules()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.