org.apache.hadoop.yarn.server.federation.policies.manager

## Class WeightedLocalityPolicyManager

- java.lang.Object
- - org.apache.hadoop.yarn.server.federation.policies.manager.AbstractPolicyManager
  - - org.apache.hadoop.yarn.server.federation.policies.manager.WeightedLocalityPolicyManager

- All Implemented Interfaces:
    FederationPolicyManager

      public class WeightedLocalityPolicyManager
      extends AbstractPolicyManager

  Policy that allows operator to configure "weights" for routing. This picks a `WeightedRandomRouterPolicy` for the router and a `LocalityMulticastAMRMProxyPolicy` for the amrmproxy as they are designed to work together.

- - ### Field Summary

    - ### Fields inherited from class org.apache.hadoop.yarn.server.federation.policies.manager.AbstractPolicyManager

      `amrmProxyFederationPolicy, LOG, routerFederationPolicy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeightedLocalityPolicyManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `WeightedPolicyInfo` | `getWeightedPolicyInfo()`
    `SubClusterPolicyConfiguration` | `serializeConf()` This method is invoked to derive a `SubClusterPolicyConfiguration`.
    `void` | `setWeightedPolicyInfo(WeightedPolicyInfo weightedPolicyInfo)`

    - ### Methods inherited from class org.apache.hadoop.yarn.server.federation.policies.manager.AbstractPolicyManager

      `getAMRMPolicy, getQueue, getRouterPolicy, setQueue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WeightedLocalityPolicyManager

          public WeightedLocalityPolicyManager()

  - ### Method Detail

    - #### serializeConf

          public SubClusterPolicyConfiguration serializeConf()
                                                      throws FederationPolicyInitializationException

      Description copied from interface: `FederationPolicyManager`
      This method is invoked to derive a `SubClusterPolicyConfiguration`. This is to be used when writing a policy object in the federation policy store.
      Specified by:
        `serializeConf` in interface `FederationPolicyManager`
      Overrides:
        `serializeConf` in class `AbstractPolicyManager`
      Returns:
        a valid policy configuration representing this object parametrization.
      Throws:
        `FederationPolicyInitializationException` - if the current state cannot be serialized properly

    - #### getWeightedPolicyInfo

          public WeightedPolicyInfo getWeightedPolicyInfo()

    - #### setWeightedPolicyInfo

          public void setWeightedPolicyInfo(WeightedPolicyInfo weightedPolicyInfo)

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.