Class RouterPolicyFacade

java.lang.Object
org.apache.hadoop.yarn.server.federation.policies.RouterPolicyFacade

public class RouterPolicyFacade extends Object
This class provides a facade to the policy subsystem, and handles the lifecycle of policies (e.g., refresh from remote, default behaviors etc.).
  • Constructor Details

  • Method Details

    • getHomeSubcluster

      public SubClusterId getHomeSubcluster(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appSubmissionContext, List<SubClusterId> blackListSubClusters) throws org.apache.hadoop.yarn.exceptions.YarnException
      This method provides a wrapper of all policy functionalities for routing . Internally it manages configuration changes, and policy init/reinit.
      Parameters:
      appSubmissionContext - the ApplicationSubmissionContext that has to be routed to an appropriate subCluster for execution.
      blackListSubClusters - the list of subClusters as identified by SubClusterId to blackList from the selection of the home subCluster.
      Returns:
      the SubClusterId that will be the "home" for this application.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if there are issues initializing policies, or no valid sub-cluster id could be found for this app.
    • reset

      public void reset()
      This method flushes all cached configurations and policies. This should be invoked if the facade remains activity after very large churn of queues in the system.
    • getReservationHomeSubCluster

      public SubClusterId getReservationHomeSubCluster(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      This method provides a wrapper of all policy functionalities for routing a reservation. Internally it manages configuration changes, and policy init/reinit.
      Parameters:
      request - the reservation to route.
      Returns:
      the id of the subcluster that will be the "home" for this reservation.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if there are issues initializing policies, or no valid sub-cluster id could be found for this reservation.