public class QueuePlacementPolicy extends Object
| Constructor and Description |
|---|
QueuePlacementPolicy(List<QueuePlacementRule> rules,
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 QueuePlacementPolicy |
fromConfiguration(org.apache.hadoop.conf.Configuration conf,
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,
Set<String> configuredQueues,
org.apache.hadoop.conf.Configuration conf)
Builds a QueuePlacementPolicy from an xml element.
|
List<QueuePlacementRule> |
getRules() |
public QueuePlacementPolicy(List<QueuePlacementRule> rules, Set<String> configuredQueues, org.apache.hadoop.conf.Configuration conf) throws AllocationConfigurationException
AllocationConfigurationExceptionpublic static QueuePlacementPolicy fromXml(Element el, Set<String> configuredQueues, org.apache.hadoop.conf.Configuration conf) throws AllocationConfigurationException
AllocationConfigurationExceptionpublic static QueuePlacementPolicy fromConfiguration(org.apache.hadoop.conf.Configuration conf, 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 © 2014 Apache Software Foundation. All Rights Reserved.