Class LocalityRouterPolicy

All Implemented Interfaces:
ConfigurableFederationPolicy, FederationRouterPolicy

public class LocalityRouterPolicy extends WeightedRandomRouterPolicy
This policy selects the subcluster depending on the node where the Client wants to run its application. It succeeds if: - There are three AMContainerResourceRequests in the order NODE, RACK, ANY It falls back to WeightedRandomRouterPolicy in case of: - Null or empty AMContainerResourceRequests; - One AMContainerResourceRequests and it has ANY as ResourceName; - The node is in blacklisted SubClusters. It fails if: - The node does not exist and RelaxLocality is False; - We have an invalid number (not 0, 1 or 3) resource requests
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • LocalityRouterPolicy

      public LocalityRouterPolicy()
  • Method Details