Class PrimaryGroupPlacementRule
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.PrimaryGroupPlacementRule
Places apps in queues by the primary group of the submitter.
-
Field Summary
Fields 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.Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.placement.FSPlacementRule
getCreateFlag, getParentRule, setConfig, setConfig, setConfig, setParentRuleMethods inherited from class org.apache.hadoop.yarn.server.resourcemanager.placement.PlacementRule
getName, getPlacementForApp
-
Constructor Details
-
PrimaryGroupPlacementRule
public PrimaryGroupPlacementRule()
-
-
Method Details
-
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) throws org.apache.hadoop.yarn.exceptions.YarnException 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 - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- for any error while executing the rule
-