public class ConfigUpgradeChangeDefinition extends Object
ConfigUpgradeChangeDefinition
represents a configuration change. This change can be
defined with conditional statements that will only set values if a condition
passes:
<definition>
<condition type="hive-site" key="hive.server2.transport.mode" value="binary">
<type>hive-site</type>
<key>hive.server2.thrift.port</key>
<value>10010</value>
</condition>
<condition type="hive-site" key="hive.server2.transport.mode" value="http">
<type>hive-site</type>
<key>hive.server2.http.port</key>
<value>10011</value>
</condition>
</definition>
It's also possible to simple set values directly without a precondition
check.
<definition xsi:type="configure">
<type>hive-site</type>
<set key="hive.server2.thrift.port" value="10010"/>
<set key="foo" value="bar"/>
<set key="foobar" value="baz"/>
</definition>
WARNING! After adding/updating classes below, please don't forget to update 'upgrade-config.xsd' respectivelyModifier and Type | Class and Description |
---|---|
static class |
ConfigUpgradeChangeDefinition.ConditionalField |
static class |
ConfigUpgradeChangeDefinition.ConfigurationKeyValue
A key/value pair to set in the type specified by
configType |
static class |
ConfigUpgradeChangeDefinition.IfValueMatchType
The
ConfigUpgradeChangeDefinition.IfValueMatchType defines value search behaviour |
static class |
ConfigUpgradeChangeDefinition.Insert
Used to replace strings in a key with other strings.
|
static class |
ConfigUpgradeChangeDefinition.InsertType
The
ConfigUpgradeChangeDefinition.InsertType defines how to use the ConfigUpgradeChangeDefinition.Insert directive. |
static class |
ConfigUpgradeChangeDefinition.Masked
Used for configuration updates that should mask their values from being
printed in plain text.
|
static class |
ConfigUpgradeChangeDefinition.RegexReplace
Used to replace strings in a key with other strings.
|
static class |
ConfigUpgradeChangeDefinition.Replace
Used to replace strings in a key with other strings.
|
static class |
ConfigUpgradeChangeDefinition.Transfer
A
transfer element will copy, move, or delete the value of one type/key to another type/key. |
Modifier and Type | Field and Description |
---|---|
static String |
actionVerb |
static Float |
DEFAULT_PRIORITY |
String |
id |
static String |
PARAMETER_CONFIG_TYPE
The key that represents the configuration type to change (ie hdfs-site).
|
static String |
PARAMETER_KEY_VALUE_PAIRS
Setting key/value pairs can be several per task, so they're passed in as a
json-ified list of objects.
|
static String |
PARAMETER_REPLACEMENTS
Replacements can be several per task, so they're passed in as a json-ified list of
objects.
|
static String |
PARAMETER_TRANSFERS
Transfers can be several per task, so they're passed in as a json-ified
list of objects.
|
String |
summary
An optional brief description of config changes.
|
Constructor and Description |
---|
ConfigUpgradeChangeDefinition() |
Modifier and Type | Method and Description |
---|---|
String |
getConfigType() |
List<ConfigUpgradeChangeDefinition.Insert> |
getInsertions()
Gets the insertion directives.
|
List<ConfigUpgradeChangeDefinition.ConfigurationKeyValue> |
getKeyValuePairs() |
List<ConfigUpgradeChangeDefinition.Replace> |
getRegexReplacements(Cluster cluster)
Evaluates the
ConfigUpgradeChangeDefinition.RegexReplace instances defined for the upgrade and
converts them into distinct ConfigUpgradeChangeDefinition.Replace objects. |
List<ConfigUpgradeChangeDefinition.Replace> |
getReplacements() |
List<ConfigUpgradeChangeDefinition.Transfer> |
getTransfers() |
public static final String PARAMETER_CONFIG_TYPE
public static final String PARAMETER_KEY_VALUE_PAIRS
public static final String PARAMETER_TRANSFERS
public static final String PARAMETER_REPLACEMENTS
public static final String actionVerb
public static final Float DEFAULT_PRIORITY
public String summary
public String id
public String getConfigType()
public List<ConfigUpgradeChangeDefinition.ConfigurationKeyValue> getKeyValuePairs()
public List<ConfigUpgradeChangeDefinition.Transfer> getTransfers()
public List<ConfigUpgradeChangeDefinition.Replace> getReplacements()
null
public List<ConfigUpgradeChangeDefinition.Replace> getRegexReplacements(Cluster cluster)
ConfigUpgradeChangeDefinition.RegexReplace
instances defined for the upgrade and
converts them into distinct ConfigUpgradeChangeDefinition.Replace
objects. In some cases, if the
regex matches more than 1 string in the configuration, it will create
multiple ConfigUpgradeChangeDefinition.Replace
objects, each with their own literal string to
find/replace.null
public List<ConfigUpgradeChangeDefinition.Insert> getInsertions()
null
).Copyright © 2022 Apache Software Foundation. All rights reserved.