CSMappingPlacementRule, FSPlacementRule@Private
@Unstable
public abstract class PlacementRule
extends java.lang.Object
| Constructor | Description |
|---|---|
PlacementRule() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getName() |
Return the name of the rule.
|
abstract ApplicationPlacementContext |
getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc,
java.lang.String user) |
Return the scheduler queue name the application should be placed in
wrapped in an
ApplicationPlacementContext object. |
ApplicationPlacementContext |
getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc,
java.lang.String user,
boolean recovery) |
Return the scheduler queue name the application should be placed in
wrapped in an
ApplicationPlacementContext object. |
abstract boolean |
initialize(ResourceScheduler scheduler) |
Initialize the rule with the scheduler.
|
void |
setConfig(java.lang.Object initArg) |
Set the config based on the passed in argument.
|
public void setConfig(java.lang.Object initArg)
initArg - initialization arguments.public java.lang.String getName()
public abstract boolean initialize(ResourceScheduler scheduler) throws java.io.IOException
scheduler - the scheduler using the ruletrue or false The outcome of the
initialisation, rule dependent response which might not be persisted in
the rule.java.io.IOException - for any errorspublic abstract ApplicationPlacementContext getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc, java.lang.String user) throws org.apache.hadoop.yarn.exceptions.YarnException
ApplicationPlacementContext object.
A non null return value places the application in a queue,
a null value means the queue is not yet determined. The
next PlacementRule in the list maintained in the
PlacementManager will be executed.asc - The context of the application created on submissionuser - The name of the user submitting the applicationApplicationPlacementContext or
null if no queue was resolvedorg.apache.hadoop.yarn.exceptions.YarnException - for any error while executing the rulepublic ApplicationPlacementContext getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc, java.lang.String user, boolean recovery) throws org.apache.hadoop.yarn.exceptions.YarnException
ApplicationPlacementContext object.
A non null return value places the application in a queue,
a null value means the queue is not yet determined. The
next PlacementRule in the list maintained in the
PlacementManager will be executed.asc - The context of the application created on submissionuser - The name of the user submitting the applicationrecovery - Indicates if the submission is a recoveryApplicationPlacementContext or
null if no queue was resolvedorg.apache.hadoop.yarn.exceptions.YarnException - for any error while executing the ruleCopyright © 2008–2025 Apache Software Foundation. All rights reserved.