Juanjo Marron created AMBARI-23285:
--------------------------------------
Summary: ${hdp.version} parameter in downloaded Service Client
Configs
Key: AMBARI-23285
URL: https://issues.apache.org/jira/browse/AMBARI-23285
Project: Ambari
Issue Type: Improvement
Components: ambari-client
Affects Versions: 2.6.2, 2.7.0
Reporter: Juanjo Marron
When using Download Service Client Configs feature in Ambari APIs, some of the
configuration files the ${hdp.version} parameter is not resolved.
This token needs to be replaced by the right hdp version value in order to
properly use some of the properties.
A good example is: mapred-site.xml configuration file form MapReduce2 service
where multiple property values downloaded maintain the parameter ${hdp.version}
These are two of them:
<property>
<name>mapreduce.application.classpath</name>
<value>$PWD/mr-framework/hadoop/share/hadoop/mapreduce/*:$PWD/mr-framework/hadoop/share/hadoop/mapreduce/lib/*:$PWD/mr-framework/hadoop/share/hadoop/common/*:$PWD/mr-framework/hadoop/share/hadoop/common/lib/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/lib/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/lib/*:$PWD/mr-framework/hadoop/share/hadoop/tools/lib/*:/usr/hdp/${hdp.version}/hadoop/lib/hadoop-lzo-0.6.0.${*hdp.version}.*jar:/etc/hadoop/conf/secure:/usr/hdp/current/ext/hadoop/*</value>
</property>
<property>
<name>mapreduce.application.framework.path</name>
<value>/hdp/apps/*${hdp.version}*/mapreduce/mapreduce.tar.gz#mr-framework</value>
</property>
Also I have seen tokens that get replaced in the UI but not in the
configuration file downloaded, for example:
The property yarn.nodemanager.aux-services.spark2_shuffle.classpath in advanced
yarn-site.xml (YARN service) shows this value in the UI:
{\{stack_root}}/${hdp.version}/spark2/aux/*
While in the client configurations obtained after downloaded
<property>
<name>yarn.nodemanager.aux-services.spark2_shuffle.classpath</name>
<value>/usr/hdp/${hdp.version}/spark2/aux/*</value>
</property>
{\{stack_root}} gets properly replaced but ${hdp.version} remains as a string
not resolved
According to the answers in the Ambari user mail list is expected for now.
The problem is that client configs are run and rendered on the Ambari server
itself, which might not even be a part of the cluster. Some properties, such as
the ones showed above , are rendered on a per-host basis, and can be different
depending on the versions of the components which are installed.
We believe that the download client configs logic needs to be rewritten to
allow you to specify the host on which you want to download them.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)