Support Questions
Find answers, ask questions, and share your expertise

Where is the top level hdp.version set within Ambari

Contributor

Experiencing inconsistencies with ${hdp.version}, would like to check the value. Once verified or changed, does this require service restarts to propagate? Thanks

4 REPLIES 4

Mentor

@Brenden Cobb check the hadoop-env properties and in general any *-env properties across all configs should have that variable.

Contributor

Hi Artem--looked in the file and did not see an export for that variable. Quick look:

/etc/hadoop/conf$ cat hadoop-env.sh | grep -i hdp 

export HADOOP_HOME=${HADOOP_HOME:-/usr/hdp/current/hadoop-client}
# Path to jsvc required by secure HDP 2.0 datanode
if [ -d "/usr/hdp/current/tez-client" ]; then
    # When using versioned RPMs, the tez-client will be a symlink to the current folder of tez in HDP.
export HADOOP_LIBEXEC_DIR=/usr/hdp/current/hadoop-client/libexec
export HADOOP_OPTS="-Dhdp.version=$HDP_VERSION $HADOOP_OPTS"

Hi @Brenden Cobb, there is no single top level hdp.version in Ambari. Rather, each command (bash script) dealing with HDFS and Yarn, like hdfs, hadoop, yarn, mapred, hbase etc. provides hdp.version by itself. Usually like this:

export HDP_VERSION=${HDP_VERSION:-2.3.4.0-3485}

By setting hdp.version and by using Yarn distributed cache one can run for example, multiple versions of MapReduce on the same cluster, details here.