public class ConfigHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CLUSTER_DEFAULT_TAG |
static String |
CLUSTER_ENV |
static String |
CLUSTER_ENV_ALERT_REPEAT_TOLERANCE |
static String |
CLUSTER_ENV_RETRY_COMMANDS |
static String |
CLUSTER_ENV_RETRY_ENABLED |
static String |
CLUSTER_ENV_RETRY_MAX_TIME_IN_SEC |
static String |
CLUSTER_ENV_STACK_FEATURES_PROPERTY |
static String |
CLUSTER_ENV_STACK_NAME_PROPERTY |
static String |
CLUSTER_ENV_STACK_PACKAGES_PROPERTY |
static String |
CLUSTER_ENV_STACK_ROOT_PROPERTY |
static String |
CLUSTER_ENV_STACK_TOOLS_PROPERTY |
static String |
COMMAND_RETRY_MAX_TIME_IN_SEC_DEFAULT |
static String |
FIRST_VERSION_TAG
The tag given to newly created versions.
|
static String |
HBASE_SITE
List of property prefixes and names.
|
static String |
HDFS_SITE |
static String |
HIVE_SITE |
static String |
HTTP_ONLY |
static String |
HTTPS_ONLY |
static String |
SERVICE_CHECK_MINIMAL |
static String |
SERVICE_CHECK_TYPE |
static String |
YARN_SITE |
Constructor and Description |
---|
ConfigHelper(Clusters c,
AmbariMetaInfo metaInfo,
Configuration configuration,
ClusterDAO clusterDAO) |
Modifier and Type | Method and Description |
---|---|
void |
applyCustomConfig(Map<String,Map<String,String>> configurations,
String type,
String name,
String value,
Boolean deleted) |
org.apache.commons.lang3.tuple.Pair<Map<String,Map<String,String>>,Map<String,Map<String,Map<String,String>>>> |
calculateExistingConfigs(Cluster cluster)
Determines the existing configurations for the cluster, both properties and attributes.
|
Map<String,Map<String,String>> |
calculateExistingConfigurations(AmbariManagementController ambariManagementController,
Cluster cluster)
Determines the existing configurations for the cluster
|
Map<String,Map<String,String>> |
calculateExistingConfigurations(AmbariManagementController ambariManagementController,
Cluster cluster,
String hostname)
Determines the existing configurations for the cluster, related to a given hostname (if provided)
|
void |
checkAllStageConfigsPresentInDesiredConfigs(Cluster cluster) |
boolean |
checkStaleConfigsStatusForHostComponent(ServiceComponentHost sch,
Map<String,Collection<String>> changedConfigs)
Checks configs are stale for specified host component.
|
void |
checkStaleConfigsStatusOnConfigsUpdate(Long clusterId,
String serviceName,
Map<Long,Map<String,Collection<String>>> changedConfigs)
Checks configs are stale after specified config changes for service's components.
|
void |
cloneAttributesMap(Map<String,Map<String,String>> sourceAttributesMap,
Map<String,Map<String,String>> targetAttributesMap) |
boolean |
createConfigType(Cluster cluster,
StackId stackId,
AmbariManagementController controller,
String configType,
Map<String,String> properties,
Map<String,Map<String,String>> propertyAttributes,
String authenticatedUserName,
String serviceVersionNote) |
void |
createConfigType(Cluster cluster,
StackId stackId,
AmbariManagementController controller,
String configType,
Map<String,String> properties,
String authenticatedUserName,
String serviceVersionNote) |
boolean |
createConfigTypes(Cluster cluster,
StackId stackId,
AmbariManagementController controller,
Map<String,Map<String,String>> batchProperties,
String authenticatedUserName,
String serviceVersionNote)
Create configurations and assign them for services.
|
Map<String,Set<String>> |
createUserGroupsMap(Cluster cluster,
Map<String,DesiredConfig> desiredConfigs,
Map<String,ServiceInfo> servicesMap,
Set<PropertyInfo> stackProperties)
Fetch user to group mapping from the cluster configs.
|
Map<String,Set<String>> |
createUserGroupsMap(StackId stackId,
Cluster cluster,
Map<String,DesiredConfig> desiredConfigs)
Fetch user to group mapping from the cluster configs.
|
static String |
fileNameToConfigType(String filename) |
Set<String> |
filterInvalidPropertyValues(Map<PropertyInfo,String> properties,
String filteredListName) |
Set<String> |
findConfigTypesByPropertyName(StackId stackId,
String propertyName,
String clusterName)
Gets all the config dictionary where property with the given name is present in stack definitions
|
void |
getAndMergeHostConfigAttributes(Map<String,Map<String,Map<String,String>>> configurationAttributes,
Map<String,Map<String,String>> configurationTags,
Cluster cluster)
Retrieves effective configuration attributes for specified cluster and tags and merge them with
present before in
configurationAttributes |
void |
getAndMergeHostConfigs(Map<String,Map<String,String>> configurations,
Map<String,Map<String,String>> configurationTags,
Cluster cluster)
Retrieves effective configurations for specified cluster and tags and merge them with
present before in
configurations |
Map<String,Collection<String>> |
getChangedConfigTypes(Cluster cluster,
ServiceConfigEntity currentServiceConfigEntity,
Long configGroupId,
Long clusterId,
String serviceName)
Calculates config types and keys were changed during configs change.
|
Map<String,Map<String,String>> |
getCredentialStoreEnabledProperties(StackId stackId,
Service service)
Gets a map of config types to password property names to password property value names,
that are credential store enabled.
|
Map<String,Map<String,String>> |
getDefaultProperties(StackId stack,
String serviceName) |
Map<String,Map<String,String>> |
getDefaultStackProperties(StackId stack)
Gets the default properties for the specified service.
|
Map<String,Map<String,Map<String,String>>> |
getEffectiveConfigAttributes(Cluster cluster,
Map<String,Map<String,String>> desiredTags)
Get all config attributes for a cluster given a set of configType to
versionTags map.
|
Map<String,Map<String,String>> |
getEffectiveConfigProperties(Cluster cluster,
Map<String,Map<String,String>> desiredTags)
Get all config properties for a cluster given a set of configType to
versionTags map.
|
Map<String,Map<String,String>> |
getEffectiveConfigProperties(String clusterName,
String hostName) |
Map<String,Map<String,String>> |
getEffectiveDesiredTags(Cluster cluster,
String hostName)
Gets the desired tags for a cluster and host
|
Map<String,Map<String,String>> |
getEffectiveDesiredTags(Cluster cluster,
String hostName,
Map<String,DesiredConfig> desiredConfigs)
Gets the desired tags for a cluster and host
|
AgentConfigsUpdateEvent |
getHostActualConfigs(Long hostId)
Collects actual configurations and configuration attributes for specified host.
|
AgentConfigsUpdateEvent |
getHostActualConfigsExcludeCluster(Long hostId,
Long clusterId) |
Map<String,String> |
getMergedConfig(Map<String,String> persistedClusterConfig,
Map<String,String> override)
Merge override with original, if original property doesn't exist,
add it to the properties
|
String |
getPlaceholderValueFromDesiredConfigurations(Cluster cluster,
String placeholder)
Gets the configuration value referenced by the specified placeholder from
the cluster configuration.
|
Map<PropertyInfo,String> |
getPropertiesWithPropertyType(PropertyInfo.PropertyType propertyType,
Cluster cluster,
Map<String,DesiredConfig> desiredConfigs,
Map<String,ServiceInfo> servicesMap,
Set<PropertyInfo> stackProperties)
Fetch all the properties of a given PropertyType.
|
Map<PropertyInfo,String> |
getPropertiesWithPropertyType(StackId stackId,
PropertyInfo.PropertyType propertyType,
Cluster cluster,
Map<String,DesiredConfig> desiredConfigs)
Fetch all the properties of a given PropertyType.
|
ServiceInfo |
getPropertyOwnerService(Cluster cluster,
String configType,
String propertyName) |
String |
getPropertyValueFromStackDefinitions(Cluster cluster,
String configType,
String propertyName)
Fetch all the config values of a given PropertyType.
|
Set<String> |
getPropertyValuesWithPropertyType(PropertyInfo.PropertyType propertyType,
Cluster cluster,
Map<String,DesiredConfig> desiredConfigs,
Map<String,ServiceInfo> servicesMap,
Set<PropertyInfo> stackProperties)
Fetch all the property values of a given PropertyType.
|
Set<String> |
getPropertyValuesWithPropertyType(StackId stackId,
PropertyInfo.PropertyType propertyType,
Cluster cluster,
Map<String,DesiredConfig> desiredConfigs)
Fetch all the property values of a given PropertyType.
|
String |
getRefreshConfigsCommand(Cluster cluster,
ServiceComponentHost sch) |
String |
getRefreshConfigsCommand(Cluster cluster,
String hostName,
String serviceName,
String componentName) |
Set<PropertyInfo> |
getServiceProperties(Cluster cluster,
String serviceName) |
Set<PropertyInfo> |
getServiceProperties(StackId stackId,
String serviceName,
boolean removeExcluded)
Retrieves a Set of PropertyInfo objects containing the relevant properties for the requested
service.
|
Set<PropertyInfo> |
getStackProperties(Cluster cluster) |
String |
getValueFromDesiredConfigurations(Cluster cluster,
String configType,
String propertyName) |
boolean |
isStaleConfigs(ServiceComponentHost sch,
Map<String,DesiredConfig> requestDesiredConfigs)
The purpose of this method is to determine if a
ServiceComponentHost 's known actual configs are different than what
is set on the cluster (the desired). |
boolean |
isStaleConfigs(ServiceComponentHost sch,
Map<String,DesiredConfig> requestDesiredConfigs,
HostComponentDesiredStateEntity hostComponentDesiredStateEntity) |
static void |
mergeConfigAttributes(Map<String,Map<String,String>> attributes,
Map<String,Map<String,String>> additionalAttributes)
Merge one attribute map to another.
|
Map<String,Map<String,String>> |
overrideAttributes(Config overrideConfig,
Map<String,Map<String,String>> persistedAttributes)
Merge override attributes with original ones.
|
static void |
processHiddenAttribute(Map<String,Map<String,String>> configurations,
Map<String,Map<String,Map<String,String>>> attributes,
String componentName,
boolean configDownload)
Removes properties from configurations that marked as hidden for specified component.
|
void |
removeConfigsByType(Cluster cluster,
String type)
Remove configs by type
|
SortedMap<String,SortedMap<String,SortedMap<String,String>>> |
sortConfigurationAttributes(Map<String,Map<String,Map<String,String>>> configurationAttributes) |
SortedMap<String,SortedMap<String,String>> |
sortConfigutations(Map<String,Map<String,String>> configurations) |
void |
updateAgentConfigs(Set<String> updatedClusters)
Checks populated services for staled configs and updates agent configs.
|
void |
updateConfigType(Cluster cluster,
StackId stackId,
AmbariManagementController controller,
String configType,
Map<String,String> updates,
Collection<String> removals,
String authenticatedUserName,
String serviceVersionNote)
A helper method to create a new
Config for a given configuration
type and updates to the current values, if any. |
boolean |
wasStaleConfigsStatusUpdated(Long clusterId,
Long hostId,
String serviceName,
String hostComponentName,
Boolean staleConfigs)
Tries to change cached stale config with new value.
|
public static final String CLUSTER_DEFAULT_TAG
public static final String HBASE_SITE
public static final String HDFS_SITE
public static final String HIVE_SITE
public static final String YARN_SITE
public static final String CLUSTER_ENV
public static final String CLUSTER_ENV_ALERT_REPEAT_TOLERANCE
public static final String CLUSTER_ENV_RETRY_ENABLED
public static final String SERVICE_CHECK_TYPE
public static final String CLUSTER_ENV_RETRY_COMMANDS
public static final String CLUSTER_ENV_RETRY_MAX_TIME_IN_SEC
public static final String COMMAND_RETRY_MAX_TIME_IN_SEC_DEFAULT
public static final String CLUSTER_ENV_STACK_NAME_PROPERTY
public static final String CLUSTER_ENV_STACK_FEATURES_PROPERTY
public static final String CLUSTER_ENV_STACK_TOOLS_PROPERTY
public static final String CLUSTER_ENV_STACK_ROOT_PROPERTY
public static final String CLUSTER_ENV_STACK_PACKAGES_PROPERTY
public static final String HTTP_ONLY
public static final String HTTPS_ONLY
public static final String SERVICE_CHECK_MINIMAL
public static final String FIRST_VERSION_TAG
@Inject public ConfigHelper(Clusters c, AmbariMetaInfo metaInfo, Configuration configuration, ClusterDAO clusterDAO)
public Map<String,Map<String,String>> getEffectiveDesiredTags(Cluster cluster, String hostName) throws org.apache.ambari.server.AmbariException
cluster
- the clusterhostName
- the host nameorg.apache.ambari.server.AmbariException
public Map<String,Map<String,String>> getEffectiveDesiredTags(Cluster cluster, String hostName, Map<String,DesiredConfig> desiredConfigs) throws org.apache.ambari.server.AmbariException
cluster
- the clusterhostName
- the host nameorg.apache.ambari.server.AmbariException
public Set<String> filterInvalidPropertyValues(Map<PropertyInfo,String> properties, String filteredListName)
public Map<String,Map<String,String>> getEffectiveConfigProperties(Cluster cluster, Map<String,Map<String,String>> desiredTags)
cluster
- desiredTags
- public Map<String,Map<String,String>> getEffectiveConfigProperties(String clusterName, String hostName) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public Map<String,Map<String,Map<String,String>>> getEffectiveConfigAttributes(Cluster cluster, Map<String,Map<String,String>> desiredTags)
cluster
- desiredTags
- public Map<String,String> getMergedConfig(Map<String,String> persistedClusterConfig, Map<String,String> override)
persistedClusterConfig
- override
- public void getAndMergeHostConfigs(Map<String,Map<String,String>> configurations, Map<String,Map<String,String>> configurationTags, Cluster cluster)
configurations
configurations
- configurations will be merged with effective cluster configurationsconfigurationTags
- configuration tags for cluster's desired configscluster
- cluster to configs retrievingpublic void getAndMergeHostConfigAttributes(Map<String,Map<String,Map<String,String>>> configurationAttributes, Map<String,Map<String,String>> configurationTags, Cluster cluster)
configurationAttributes
configurationAttributes
- configuration attributes will be merged with effective ones on the clusterconfigurationTags
- configuration tags for cluster's desired configscluster
- cluster to config attributes retrievingpublic Map<String,Map<String,String>> overrideAttributes(Config overrideConfig, Map<String,Map<String,String>> persistedAttributes)
public void cloneAttributesMap(Map<String,Map<String,String>> sourceAttributesMap, Map<String,Map<String,String>> targetAttributesMap)
public void applyCustomConfig(Map<String,Map<String,String>> configurations, String type, String name, String value, Boolean deleted)
public boolean isStaleConfigs(ServiceComponentHost sch, Map<String,DesiredConfig> requestDesiredConfigs) throws org.apache.ambari.server.AmbariException
ServiceComponentHost
's known actual configs are different than what
is set on the cluster (the desired). The following logic is applied:
false
true
if the config key is on the
stack. otherwise false
false
true
if the changed keys
exist on the stack, otherwise false
sch
- the SCH to calcualte config staleness for (not null
).requestDesiredConfigs
- the desired configurations for the cluster. Obtaining these can be
expensive and since this method operates on SCH's, it could be
called 10,000's of times when generating cluster/host responses.
Therefore, the caller should build these once and pass them in. If
null
, then this method will retrieve them at runtime,
incurring a performance penality.true
if the actual configs are staleorg.apache.ambari.server.AmbariException
public boolean isStaleConfigs(ServiceComponentHost sch, Map<String,DesiredConfig> requestDesiredConfigs, HostComponentDesiredStateEntity hostComponentDesiredStateEntity) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public void removeConfigsByType(Cluster cluster, String type)
type
- config Typepublic Set<String> findConfigTypesByPropertyName(StackId stackId, String propertyName, String clusterName) throws org.apache.ambari.server.AmbariException
stackId
- propertyName
- org.apache.ambari.server.AmbariException
public Map<String,Map<String,String>> getCredentialStoreEnabledProperties(StackId stackId, Service service) throws org.apache.ambari.server.AmbariException
stackId
- service
- org.apache.ambari.server.AmbariException
public Map<String,Set<String>> createUserGroupsMap(StackId stackId, Cluster cluster, Map<String,DesiredConfig> desiredConfigs) throws org.apache.ambari.server.AmbariException
stackId
- cluster
- desiredConfigs
- org.apache.ambari.server.AmbariException
public Map<String,Set<String>> createUserGroupsMap(Cluster cluster, Map<String,DesiredConfig> desiredConfigs, Map<String,ServiceInfo> servicesMap, Set<PropertyInfo> stackProperties) throws org.apache.ambari.server.AmbariException
cluster
- desiredConfigs
- servicesMap
- stackProperties
- org.apache.ambari.server.AmbariException
public Map<PropertyInfo,String> getPropertiesWithPropertyType(StackId stackId, PropertyInfo.PropertyType propertyType, Cluster cluster, Map<String,DesiredConfig> desiredConfigs) throws org.apache.ambari.server.AmbariException
stackId
- propertyType
- cluster
- desiredConfigs
- org.apache.ambari.server.AmbariException
public Map<PropertyInfo,String> getPropertiesWithPropertyType(PropertyInfo.PropertyType propertyType, Cluster cluster, Map<String,DesiredConfig> desiredConfigs, Map<String,ServiceInfo> servicesMap, Set<PropertyInfo> stackProperties) throws org.apache.ambari.server.AmbariException
propertyType
- cluster
- desiredConfigs
- servicesMap
- stackProperties
- org.apache.ambari.server.AmbariException
public Set<String> getPropertyValuesWithPropertyType(StackId stackId, PropertyInfo.PropertyType propertyType, Cluster cluster, Map<String,DesiredConfig> desiredConfigs) throws org.apache.ambari.server.AmbariException
stackId
- propertyType
- cluster
- desiredConfigs
- org.apache.ambari.server.AmbariException
public Set<String> getPropertyValuesWithPropertyType(PropertyInfo.PropertyType propertyType, Cluster cluster, Map<String,DesiredConfig> desiredConfigs, Map<String,ServiceInfo> servicesMap, Set<PropertyInfo> stackProperties) throws org.apache.ambari.server.AmbariException
propertyType
- cluster
- desiredConfigs
- servicesMap
- stackProperties
- org.apache.ambari.server.AmbariException
public void checkAllStageConfigsPresentInDesiredConfigs(Cluster cluster) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public String getPropertyValueFromStackDefinitions(Cluster cluster, String configType, String propertyName) throws org.apache.ambari.server.AmbariException
cluster
- configType
- propertyName
- org.apache.ambari.server.AmbariException
public String getPlaceholderValueFromDesiredConfigurations(Cluster cluster, String placeholder)
foo
defined in
hdfs-site
.cluster
- the cluster to use when rendering the placeholder value (not
null
).placeholder
- the placeholder value, such as {{hdfs-site/foobar}} (not
null
)null
if none.org.apache.ambari.server.AmbariException
- if there was a problem parsing the placeholder or retrieving the
referenced value.public String getValueFromDesiredConfigurations(Cluster cluster, String configType, String propertyName)
public ServiceInfo getPropertyOwnerService(Cluster cluster, String configType, String propertyName) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public Set<PropertyInfo> getServiceProperties(Cluster cluster, String serviceName) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public Set<PropertyInfo> getServiceProperties(StackId stackId, String serviceName, boolean removeExcluded) throws org.apache.ambari.server.AmbariException
removeExcluded
is true
, the service's excluded configuration types
are used to prune off PropertyInfos that should be ignored; else if false
, all
PropertyInfos will be returned.stackId
- a StackId declaring the relevant stackserviceName
- a String containing the requested service's nameremoveExcluded
- a boolean value indicating whether to remove properties from excluded
configuration types (true
) or return the complete set of properties regardless of exclusions (false
)org.apache.ambari.server.AmbariException
- if the requested stack or the requested service is not foundpublic Set<PropertyInfo> getStackProperties(Cluster cluster) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public void updateConfigType(Cluster cluster, StackId stackId, AmbariManagementController controller, String configType, Map<String,String> updates, Collection<String> removals, String authenticatedUserName, String serviceVersionNote) throws org.apache.ambari.server.AmbariException
Config
for a given configuration
type and updates to the current values, if any. This method will perform the following tasks:
Config
in the cluster for the specified type. This
will have the proper versions and tags set automatically.DesiredConfig
to the new configurationcluster
- controller
- configType
- updates
- removals
- a collection of property names to remove from the configuration typeauthenticatedUserName
- serviceVersionNote
- org.apache.ambari.server.AmbariException
public void createConfigType(Cluster cluster, StackId stackId, AmbariManagementController controller, String configType, Map<String,String> properties, String authenticatedUserName, String serviceVersionNote) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public boolean createConfigType(Cluster cluster, StackId stackId, AmbariManagementController controller, String configType, Map<String,String> properties, Map<String,Map<String,String>> propertyAttributes, String authenticatedUserName, String serviceVersionNote) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public boolean createConfigTypes(Cluster cluster, StackId stackId, AmbariManagementController controller, Map<String,Map<String,String>> batchProperties, String authenticatedUserName, String serviceVersionNote) throws org.apache.ambari.server.AmbariException
cluster
- the clustercontroller
- the controllerstackId
- the stack to create the new properties forbatchProperties
- the type->config map batch of propertiesauthenticatedUserName
- the user that initiated the changeserviceVersionNote
- the service version noteorg.apache.ambari.server.AmbariException
public Map<String,Map<String,String>> getDefaultStackProperties(StackId stack) throws org.apache.ambari.server.AmbariException
stack
- the stack to pull stack-values from (not null
)org.apache.ambari.server.AmbariException
public Map<String,Map<String,String>> getDefaultProperties(StackId stack, String serviceName) throws org.apache.ambari.server.AmbariException
stack
- the stack to pull stack-values from (not null
)serviceName
- the service name null
).org.apache.ambari.server.AmbariException
public void updateAgentConfigs(Set<String> updatedClusters) throws org.apache.ambari.server.AmbariException
updatedClusters
- names of clusters with changed configsorg.apache.ambari.server.AmbariException
public void checkStaleConfigsStatusOnConfigsUpdate(Long clusterId, String serviceName, Map<Long,Map<String,Collection<String>>> changedConfigs) throws org.apache.ambari.server.AmbariException
clusterId
- cluster with changed configserviceName
- service for changed configchangedConfigs
- map of config types to collections of changed properties' names.org.apache.ambari.server.AmbariException
public boolean wasStaleConfigsStatusUpdated(Long clusterId, Long hostId, String serviceName, String hostComponentName, Boolean staleConfigs)
clusterId
- cluster id.hostId
- host id.serviceName
- service name.hostComponentName
- component name.staleConfigs
- value to check.public boolean checkStaleConfigsStatusForHostComponent(ServiceComponentHost sch, Map<String,Collection<String>> changedConfigs) throws org.apache.ambari.server.AmbariException
sch
- host component to check.changedConfigs
- map of config types to collections of changed properties' names.org.apache.ambari.server.AmbariException
public Map<String,Collection<String>> getChangedConfigTypes(Cluster cluster, ServiceConfigEntity currentServiceConfigEntity, Long configGroupId, Long clusterId, String serviceName)
currentServiceConfigEntity
- service config entity with populated current cluster configsconfigGroupId
- id of config group contained changed configs. Can be null in case group is defaultclusterId
- cluster idserviceName
- service name configs were changed forpublic String getRefreshConfigsCommand(Cluster cluster, String hostName, String serviceName, String componentName) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public String getRefreshConfigsCommand(Cluster cluster, ServiceComponentHost sch) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public static void processHiddenAttribute(Map<String,Map<String,String>> configurations, Map<String,Map<String,Map<String,String>>> attributes, String componentName, boolean configDownload)
configurations
- cluster configurationsattributes
- configuration attributescomponentName
- component nameconfigDownload
- indicates if config must be downloadedpublic static void mergeConfigAttributes(Map<String,Map<String,String>> attributes, Map<String,Map<String,String>> additionalAttributes)
attributes
- original mapadditionalAttributes
- map with additional attributespublic AgentConfigsUpdateEvent getHostActualConfigs(Long hostId) throws org.apache.ambari.server.AmbariException
hostId
- host id to collect configurations and configuration attributesorg.apache.ambari.server.AmbariException
public AgentConfigsUpdateEvent getHostActualConfigsExcludeCluster(Long hostId, Long clusterId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public SortedMap<String,SortedMap<String,String>> sortConfigutations(Map<String,Map<String,String>> configurations)
public SortedMap<String,SortedMap<String,SortedMap<String,String>>> sortConfigurationAttributes(Map<String,Map<String,Map<String,String>>> configurationAttributes)
public Map<String,Map<String,String>> calculateExistingConfigurations(AmbariManagementController ambariManagementController, Cluster cluster) throws org.apache.ambari.server.AmbariException
ambariManagementController
- the Ambari management controllercluster
- the clusterorg.apache.ambari.server.AmbariException
public Map<String,Map<String,String>> calculateExistingConfigurations(AmbariManagementController ambariManagementController, Cluster cluster, String hostname) throws org.apache.ambari.server.AmbariException
ambariManagementController
- the Ambari management controllercluster
- the clusterhostname
- a hostnameorg.apache.ambari.server.AmbariException
public org.apache.commons.lang3.tuple.Pair<Map<String,Map<String,String>>,Map<String,Map<String,Map<String,String>>>> calculateExistingConfigs(Cluster cluster) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
Copyright © 2022 Apache Software Foundation. All rights reserved.