ConfigurableFederationPolicy, FederationRouterPolicypublic class HashBasedRouterPolicy extends AbstractRouterPolicy
FederationRouterPolicy pick a subcluster based on the hash of
the job's queue name. Useful to provide a default behavior when too many
queues exist in a system. This also ensures that all jobs belonging to a
queue are mapped to the same sub-cluster (likely help with locality).| Constructor | Description |
|---|---|
HashBasedRouterPolicy() |
| Modifier and Type | Method | Description |
|---|---|---|
protected SubClusterId |
chooseSubCluster(java.lang.String queue,
java.util.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 federationPolicyContext) |
This method is invoked to initialize of update the configuration of
policies.
|
getHomeSubcluster, getReservationHomeSubcluster, prefilterSubClusters, validate, validategetActiveSubclusters, getIsDirty, getPolicyContext, getPolicyInfo, setPolicyContext, setPolicyInfopublic void reinitialize(FederationPolicyInitializationContext federationPolicyContext) throws FederationPolicyInitializationException
ConfigurableFederationPolicyreinitialize in interface ConfigurableFederationPolicyreinitialize in class AbstractConfigurableFederationPolicyfederationPolicyContext - the new context to provide to implementor.FederationPolicyInitializationException - in case the initialization
fails.protected SubClusterId chooseSubCluster(java.lang.String queue, java.util.Map<SubClusterId,SubClusterInfo> preSelectSubclusters) throws org.apache.hadoop.yarn.exceptions.YarnException
AbstractRouterPolicychooseSubCluster in class AbstractRouterPolicyqueue - 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–2025 Apache Software Foundation. All rights reserved.