Interface MutableConfigurationProvider
- All Known Implementing Classes:
MutableCSConfigurationProvider
public interface MutableConfigurationProvider
Interface for allowing changing scheduler configurations.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.conf.ConfigurationapplyChanges(org.apache.hadoop.conf.Configuration oldConfiguration, org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo confUpdate) Apply the changes on top of the actual configuration.voidclose()Closes the configuration provider, releasing any required resources.voidconfirmPendingMutation(YarnConfigurationStore.LogMutation pendingMutation, boolean isValid) Confirm last logged mutation.voidformatConfigurationInStore(org.apache.hadoop.conf.Configuration conf) Get the acl mutation policy for this configuration provider.org.apache.hadoop.conf.ConfigurationReturns scheduler configuration cached in this provider.longGet the last updated scheduler config version.logAndApplyMutation(org.apache.hadoop.security.UserGroupInformation user, org.apache.hadoop.yarn.webapp.dao.SchedConfUpdateInfo confUpdate) Log user's requested configuration mutation, and applies it in-memory.voidCalled when a new ResourceManager is starting/becomes active.voidrevertToOldConfig(org.apache.hadoop.conf.Configuration config)
-
Method Details
-
getAclMutationPolicy
ConfigurationMutationACLPolicy getAclMutationPolicy()Get the acl mutation policy for this configuration provider.- Returns:
- The acl mutation policy.
-
reloadConfigurationFromStore
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 changeconfUpdate- 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 configurationconfUpdate- 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 applyisValid- 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
Get the last updated scheduler config version.- Returns:
- Last updated scheduler config version.
- Throws:
Exception- exception occurs.
-
formatConfigurationInStore
- Throws:
Exception
-
revertToOldConfig
- Throws:
Exception
-
close
Closes the configuration provider, releasing any required resources.- Throws:
IOException- on failure to close
-