org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
Class QueuePlacementPolicy
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.QueuePlacementPolicy
public class QueuePlacementPolicy
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueuePlacementPolicy
public QueuePlacementPolicy(List<QueuePlacementRule> rules,
Set<String> configuredQueues,
org.apache.hadoop.conf.Configuration conf)
throws AllocationConfigurationException
- Throws:
AllocationConfigurationException
fromXml
public static QueuePlacementPolicy fromXml(Element el,
Set<String> configuredQueues,
org.apache.hadoop.conf.Configuration conf)
throws AllocationConfigurationException
- Builds a QueuePlacementPolicy from an xml element.
- Throws:
AllocationConfigurationException
fromConfiguration
public 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.
assignAppToQueue
public String assignAppToQueue(String requestedQueue,
String user)
throws IOException
- Applies this rule to an app with the given requested queue and user/group
information.
- Parameters:
requestedQueue - The queue specified in the ApplicationSubmissionContextuser - The user submitting the app
- Returns:
- The name of the queue to assign the app to. Or null if the app should
be rejected.
- Throws:
IOException - If an exception is encountered while getting the user's groups
getRules
public List<QueuePlacementRule> getRules()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.