Interface MutableConfigurationProvider

All Known Implementing Classes:
MutableCSConfigurationProvider

public interface MutableConfigurationProvider
Interface for allowing changing scheduler configurations.
  • Method Details

    • getAclMutationPolicy

      ConfigurationMutationACLPolicy getAclMutationPolicy()
      Get the acl mutation policy for this configuration provider.
      Returns:
      The acl mutation policy.
    • reloadConfigurationFromStore

      void reloadConfigurationFromStore() throws Exception
      Called when a new ResourceManager is starting/becomes active. Ensures configuration is up-to-date.
      Throws:
      Exception - if configuration could not be refreshed from store
    • logAndApplyMutation

      YarnConfigurationStore.LogMutation logAndApplyMutation(org.apache.hadoop.security.UserGroupInformation user, org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo confUpdate) throws Exception
      Log user's requested configuration mutation, and applies it in-memory.
      Parameters:
      user - User who requested the change
      confUpdate - User's requested configuration change
      Returns:
      LogMutation with update info from given SchedConfUpdateInfo
      Throws:
      Exception - if logging the mutation fails
    • applyChanges

      org.apache.hadoop.conf.Configuration applyChanges(org.apache.hadoop.conf.Configuration oldConfiguration, org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo confUpdate) throws IOException
      Apply the changes on top of the actual configuration.
      Parameters:
      oldConfiguration - actual configuration
      confUpdate - changelist
      Returns:
      new configuration with the applied changed
      Throws:
      IOException - if the merge failed
    • confirmPendingMutation

      void confirmPendingMutation(YarnConfigurationStore.LogMutation pendingMutation, boolean isValid) throws Exception
      Confirm last logged mutation.
      Parameters:
      pendingMutation - the log mutation to apply
      isValid - if the last logged mutation is applied to scheduler properly.
      Throws:
      Exception - if confirming mutation fails
    • getConfiguration

      org.apache.hadoop.conf.Configuration getConfiguration()
      Returns scheduler configuration cached in this provider.
      Returns:
      scheduler configuration.
    • getConfigVersion

      long getConfigVersion() throws Exception
      Get the last updated scheduler config version.
      Returns:
      Last updated scheduler config version.
      Throws:
      Exception - exception occurs.
    • formatConfigurationInStore

      void formatConfigurationInStore(org.apache.hadoop.conf.Configuration conf) throws Exception
      Throws:
      Exception
    • revertToOldConfig

      void revertToOldConfig(org.apache.hadoop.conf.Configuration config) throws Exception
      Throws:
      Exception
    • close

      void close() throws IOException
      Closes the configuration provider, releasing any required resources.
      Throws:
      IOException - on failure to close