All Implemented Interfaces:
FederationAMRMProxyPolicy, ConfigurableFederationPolicy

public class HomeAMRMProxyPolicy extends AbstractAMRMProxyPolicy
An implementation of the FederationAMRMProxyPolicy that simply sends the ResourceRequest to the home subcluster.
  • Constructor Details

    • HomeAMRMProxyPolicy

      public HomeAMRMProxyPolicy()
  • Method Details

    • reinitialize

      public void reinitialize(FederationPolicyInitializationContext policyContext) throws FederationPolicyInitializationException
      Description copied from interface: ConfigurableFederationPolicy
      This method is invoked to initialize of update the configuration of policies. The implementor should provide try-n-swap semantics, and retain state if possible.
      Specified by:
      reinitialize in interface ConfigurableFederationPolicy
      Overrides:
      reinitialize in class AbstractConfigurableFederationPolicy
      Parameters:
      policyContext - the new context to provide to implementor.
      Throws:
      FederationPolicyInitializationException - in case the initialization fails.
    • splitResourceRequests

      public Map<SubClusterId,List<org.apache.hadoop.yarn.api.records.ResourceRequest>> splitResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> resourceRequests, Set<SubClusterId> timedOutSubClusters) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: FederationAMRMProxyPolicy
      Splits the ResourceRequests from the client across one or more sub-clusters based on the policy semantics (e.g., broadcast, load-based).
      Parameters:
      resourceRequests - the list of ResourceRequests from the AM to be split
      timedOutSubClusters - the set of sub-clusters that haven't had a successful heart-beat response for a while.
      Returns:
      map of sub-cluster as identified by SubClusterId to the list of ResourceRequests that should be forwarded to it
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - in case the request is malformed or no viable sub-clusters can be found.