public class CreateAndConfigureAction extends ConfigureAction
CreateAndConfigureAction
is used to alter a configuration property during
an upgrade. It also creates the config type if it does not exist as a desired config for the cluster.
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_metainfoProvider, m_upgradeDAO, m_upgradeHelper
actionLog, gson
ACTION_NAME, ACTION_USER_NAME, DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, WRAPPED_CLASS_NAME
Constructor and Description |
---|
CreateAndConfigureAction() |
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, getUpgradeContext
auditLog, createCommandReport, createCompletedCommandReport, getCommandParameters, getCommandParameterValue, getExecutionCommand, getHostRoleCommand, setExecutionCommand, setHostRoleCommand
public CommandReport execute(ConcurrentMap<String,Object> requestSharedDataContext) throws org.apache.ambari.server.AmbariException, InterruptedException
ConfigureAction
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 |
execute
in interface ServerAction
execute
in class ConfigureAction
requestSharedDataContext
- a Map to be used a shared data among all ServerActions related
to a given requestorg.apache.ambari.server.AmbariException
InterruptedException
Copyright © 2022 Apache Software Foundation. All rights reserved.