Class PriorityRouterPolicy
java.lang.Object
org.apache.hadoop.yarn.server.federation.policies.AbstractConfigurableFederationPolicy
org.apache.hadoop.yarn.server.federation.policies.router.AbstractRouterPolicy
org.apache.hadoop.yarn.server.federation.policies.router.PriorityRouterPolicy
- All Implemented Interfaces:
ConfigurableFederationPolicy,FederationRouterPolicy
This implements a policy that interprets "weights" as a ordered list of
preferences among sub-clusters. Highest weight among active subclusters is
chosen.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SubClusterIdchooseSubCluster(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.Methods inherited from class org.apache.hadoop.yarn.server.federation.policies.router.AbstractRouterPolicy
getHomeSubcluster, getReservationHomeSubcluster, prefilterSubClusters, validate, validateMethods inherited from class org.apache.hadoop.yarn.server.federation.policies.AbstractConfigurableFederationPolicy
getActiveSubclusters, getIsDirty, getPolicyContext, getPolicyInfo, reinitialize, setPolicyContext, setPolicyInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.yarn.server.federation.policies.ConfigurableFederationPolicy
reinitialize
-
Constructor Details
-
PriorityRouterPolicy
public PriorityRouterPolicy()
-
-
Method Details
-
chooseSubCluster
protected SubClusterId chooseSubCluster(String queue, Map<SubClusterId, SubClusterInfo> preSelectSubclusters) throws org.apache.hadoop.yarn.exceptions.YarnExceptionDescription copied from class:AbstractRouterPolicyThis method is implemented by the specific policy, and it is used to route both reservations, and applications among a given set of sub-clusters.- Specified by:
chooseSubClusterin classAbstractRouterPolicy- Parameters:
queue- the queue for this application/reservationpreSelectSubclusters- a pre-filter set of sub-clusters- Returns:
- the chosen sub-cluster
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if the policy fails to choose a sub-cluster
-