@InterfaceAudience.Private @InterfaceStability.Unstable public final class PlacementFactory extends Object
PlacementRule
.Modifier and Type | Method and Description |
---|---|
static PlacementRule |
getPlacementRule(Class<? extends PlacementRule> ruleClass,
Object initArg)
Create a new
PlacementRule based on the rule class from the
configuration. |
static PlacementRule |
getPlacementRule(String ruleStr,
org.apache.hadoop.conf.Configuration conf)
Create a new
PlacementRule based on the rule class from the
configuration. |
public static PlacementRule getPlacementRule(String ruleStr, org.apache.hadoop.conf.Configuration conf) throws ClassNotFoundException
PlacementRule
based on the rule class from the
configuration. This is used to instantiate rules by the scheduler which
does not resolve the class before this call.ruleStr
- The name of the class to instantiateconf
- The configuration object to set for the ruleClassNotFoundException
- no definition for the class with the specified name could be found.public static PlacementRule getPlacementRule(Class<? extends PlacementRule> ruleClass, Object initArg)
PlacementRule
based on the rule class from the
configuration. This is used to instantiate rules by the scheduler which
resolve the class before this call.ruleClass
- The specific class reference to instantiateinitArg
- The config to setCopyright © 2008–2024 Apache Software Foundation. All rights reserved.