public class UniformRandomRouterPolicy extends AbstractRouterPolicy
WeightedRandomRouterPolicy
.
Behavior only diverges when there are active sub-clusters that are not part
of the "weights", in which case the UniformRandomRouterPolicy
send
load to them, while WeightedRandomRouterPolicy
does not.Constructor and Description |
---|
UniformRandomRouterPolicy() |
Modifier and Type | Method and Description |
---|---|
protected SubClusterId |
chooseSubCluster(String queue,
Map<SubClusterId,SubClusterInfo> preSelectSubclusters)
This method is implemented by the specific policy, and it is used to route
both reservations, and applications among a given set of
sub-clusters.
|
void |
reinitialize(FederationPolicyInitializationContext policyContext)
This method is invoked to initialize of update the configuration of
policies.
|
getHomeSubcluster, getReservationHomeSubcluster, prefilterSubClusters, validate, validate
getActiveSubclusters, getIsDirty, getPolicyContext, getPolicyInfo, setPolicyContext, setPolicyInfo
public void reinitialize(FederationPolicyInitializationContext policyContext) throws FederationPolicyInitializationException
ConfigurableFederationPolicy
reinitialize
in interface ConfigurableFederationPolicy
reinitialize
in class AbstractConfigurableFederationPolicy
policyContext
- the new context to provide to implementor.FederationPolicyInitializationException
- in case the initialization
fails.protected SubClusterId chooseSubCluster(String queue, Map<SubClusterId,SubClusterInfo> preSelectSubclusters) throws org.apache.hadoop.yarn.exceptions.YarnException
AbstractRouterPolicy
chooseSubCluster
in class AbstractRouterPolicy
queue
- the queue for this application/reservationpreSelectSubclusters
- a pre-filter set of sub-clustersorg.apache.hadoop.yarn.exceptions.YarnException
- if the policy fails to choose a sub-clusterCopyright © 2008–2024 Apache Software Foundation. All rights reserved.