Interface FederationPolicyStore

All Known Subinterfaces:
FederationStateStore
All Known Implementing Classes:
MemoryFederationStateStore, SQLFederationStateStore, ZookeeperFederationStateStore

@Private @Unstable public interface FederationPolicyStore
The FederationPolicyStore provides a key-value interface to access the policies configured for the system. The key is a "queue" name, i.e., the system allows to configure a different policy for each queue in the system (though each policy can make dynamic run-time decisions on a per-job/per-task basis). The value is a SubClusterPolicyConfiguration, a serialized representation of the policy type and its parameters.
  • Method Details

    • getPolicyConfiguration

      GetSubClusterPolicyConfigurationResponse getPolicyConfiguration(GetSubClusterPolicyConfigurationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Get the policy configuration for a given queue.
      Parameters:
      request - the queue whose SubClusterPolicyConfiguration is required
      Returns:
      the SubClusterPolicyConfiguration for the specified queue, or null if there is no mapping for the queue
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • setPolicyConfiguration

      SetSubClusterPolicyConfigurationResponse setPolicyConfiguration(SetSubClusterPolicyConfigurationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Set the policy configuration for a given queue.
      Parameters:
      request - the SubClusterPolicyConfiguration with the corresponding queue
      Returns:
      response empty on successfully updating the SubClusterPolicyConfiguration for the specified queue
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • getPoliciesConfigurations

      GetSubClusterPoliciesConfigurationsResponse getPoliciesConfigurations(GetSubClusterPoliciesConfigurationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Get a map of all queue-to-policy configurations.
      Parameters:
      request - empty to represent all configured queues in the system
      Returns:
      the policies for all currently active queues in the system
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • deletePoliciesConfigurations

      DeleteSubClusterPoliciesConfigurationsResponse deletePoliciesConfigurations(DeleteSubClusterPoliciesConfigurationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException
      Delete PoliciesConfigurations.
      Parameters:
      request - List containing delete queues.
      Returns:
      response empty means the queue list has been deleted successfully.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if the request is invalid/fails
    • deleteAllPoliciesConfigurations

      Delete all queue-to-policy configurations.
      Parameters:
      request - delete request.
      Returns:
      If the response is empty, the queue-to-policy configurations are deleted successfully.
      Throws:
      Exception - if the request is invalid/fails