Class DefaultPlacementRule
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.placement.PlacementRule
org.apache.hadoop.yarn.server.resourcemanager.placement.FSPlacementRule
org.apache.hadoop.yarn.server.resourcemanager.placement.DefaultPlacementRule
Places apps in the specified default queue. If no default queue is
specified the app is placed in root.default queue.
-
Field Summary
FieldsFields inherited from class org.apache.hadoop.yarn.server.resourcemanager.placement.FSPlacementRule
createQueue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc, String user) Return the scheduler queue name the application should be placed in wrapped in anApplicationPlacementContextobject.booleaninitialize(ResourceScheduler scheduler) Standard initialisation forFairSchedulerrules, shared by all rules.voidSet the rule config just setting the create flag.voidSet the rule config from the xml config.Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.placement.FSPlacementRule
getCreateFlag, getParentRule, setConfig, setParentRuleMethods inherited from class org.apache.hadoop.yarn.server.resourcemanager.placement.PlacementRule
getName, getPlacementForApp
-
Field Details
-
defaultQueueName
-
-
Constructor Details
-
DefaultPlacementRule
public DefaultPlacementRule()
-
-
Method Details
-
setConfig
Set the rule config from the xml config.- Overrides:
setConfigin classFSPlacementRule- Parameters:
conf- An xml element from theFairScheduler.conf
-
setConfig
Set the rule config just setting the create flag.- Overrides:
setConfigin classFSPlacementRule- Parameters:
create- flag to allow queue creation for this rule
-
initialize
Description copied from class:FSPlacementRuleStandard initialisation forFairSchedulerrules, shared by all rules. Each rule that extends this abstract and overrides this method must callsuper.initialize()to run this basic initialisation.- Overrides:
initializein classFSPlacementRule- Parameters:
scheduler- the scheduler using the rule- Returns:
truein all cases- Throws:
IOException- for any errors
-
getPlacementForApp
public ApplicationPlacementContext getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc, String user) Description copied from class:PlacementRuleReturn the scheduler queue name the application should be placed in wrapped in anApplicationPlacementContextobject. A nonnullreturn value places the application in a queue, anullvalue means the queue is not yet determined. The nextPlacementRulein the list maintained in thePlacementManagerwill be executed.- Specified by:
getPlacementForAppin classPlacementRule- Parameters:
asc- The context of the application created on submissionuser- The name of the user submitting the application- Returns:
- The queue name wrapped in
ApplicationPlacementContextornullif no queue was resolved
-