public class ConfigureAction extends AbstractUpgradeServerAction
ConfigureAction is used to alter a configuration property during
an upgrade. It will only produce a new configuration if an actual change is
occuring. For some configure tasks, the value is already at the desired
property or the conditions of the task are not met. In these cases, a new
configuration will not be created. This task can perform any of the following
actions in a single declaration:
agentConfigsHolder, m_amc, m_clusters, m_metainfoProvider, m_upgradeDAO, m_upgradeHelperactionLog, gsonACTION_NAME, ACTION_USER_NAME, DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, WRAPPED_CLASS_NAME| Constructor and Description |
|---|
ConfigureAction() |
| Modifier and Type | Method and Description |
|---|---|
CommandReport |
execute(ConcurrentMap<String,Object> requestSharedDataContext)
Aside from the normal execution, this method performs the following logic, with
the stack values set in the table below:
|
getClusters, getGson, getUpgradeContextauditLog, createCommandReport, createCompletedCommandReport, getCommandParameters, getCommandParameterValue, getExecutionCommand, getHostRoleCommand, setExecutionCommand, setHostRoleCommandpublic CommandReport execute(ConcurrentMap<String,Object> requestSharedDataContext) throws org.apache.ambari.server.AmbariException, InterruptedException
| Upgrade Path | direction | Stack Actual | Stack Desired | Config Stack | Action |
|---|---|---|---|---|---|
| 2.2.x -> 2.2.y | upgrade or downgrade | 2.2 | 2.2 | 2.2 | if value has changed, create a new config object with new value |
| 2.2 -> 2.3 | upgrade | 2.2 | 2.3: set before action is executed | 2.3: set before action is executed | new configs are already created; just update with new properties |
| 2.3 -> 2.2 | downgrade | 2.2 | 2.2: set before action is executed | 2.2 | configs are already managed, results are the same as 2.2.x -> 2.2.y |
requestSharedDataContext - a Map to be used a shared data among all ServerActions related
to a given requestorg.apache.ambari.server.AmbariExceptionInterruptedExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.