public class CSMappingPlacementRule extends PlacementRule
Constructor and Description |
---|
CSMappingPlacementRule() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.security.Groups |
getGroups() |
ApplicationPlacementContext |
getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc,
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,
String user,
boolean recovery)
Return the scheduler queue name the application should be placed in
wrapped in an
ApplicationPlacementContext object. |
boolean |
initialize(ResourceScheduler scheduler)
Initialize the rule with the scheduler.
|
void |
setFailOnConfigError(boolean failOnConfigError) |
void |
setGroups(org.apache.hadoop.security.Groups groups) |
getName, setConfig
@VisibleForTesting public void setGroups(org.apache.hadoop.security.Groups groups)
@VisibleForTesting public void setFailOnConfigError(boolean failOnConfigError)
public boolean initialize(ResourceScheduler scheduler) throws IOException
PlacementRule
initialize
in class PlacementRule
scheduler
- the scheduler using the ruletrue
or false
The outcome of the
initialisation, rule dependent response which might not be persisted in
the rule.IOException
- for any errorspublic ApplicationPlacementContext getPlacementForApp(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext asc, String user) throws org.apache.hadoop.yarn.exceptions.YarnException
PlacementRule
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.getPlacementForApp
in class PlacementRule
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, String user, boolean recovery) throws org.apache.hadoop.yarn.exceptions.YarnException
PlacementRule
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.getPlacementForApp
in class PlacementRule
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 rule@VisibleForTesting public org.apache.hadoop.security.Groups getGroups()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.