Class PriorityRouterPolicy

All Implemented Interfaces:
ConfigurableFederationPolicy, FederationRouterPolicy

public class PriorityRouterPolicy extends AbstractRouterPolicy
This implements a policy that interprets "weights" as a ordered list of preferences among sub-clusters. Highest weight among active subclusters is chosen.
  • Constructor Details

    • PriorityRouterPolicy

      public PriorityRouterPolicy()
  • Method Details

    • chooseSubCluster

      protected SubClusterId chooseSubCluster(String queue, Map<SubClusterId,SubClusterInfo> preSelectSubclusters) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: AbstractRouterPolicy
      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.
      Specified by:
      chooseSubCluster in class AbstractRouterPolicy
      Parameters:
      queue - the queue for this application/reservation
      preSelectSubclusters - 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