You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Di Li <lo...@yahoo.com.INVALID> on 2016/02/29 20:52:26 UTC

How hdp.version is calculated?

Hello folks,

I notice many services uses ${hdp.version} in their Python scripts.  I yet failed to locate the logic in Ambari code that shows how hdp.version is calculated to an exact value based on the stack.

Could someone please give me some points on how hdp.version is calculated ?

Thanks.

Di.

Re: How hdp.version is calculated?

Posted by Alejandro Fernandez <af...@hortonworks.com>.
A lot of services rely on how the process is started. It analysis its
current working directory to find the version of HDP from the path.
E.g.,
/usr/hdp/current/$component-name symlink to /usr/hdp/#.#.#.#-###/$component
/usr/hdp/#.#.#.#-###/$component/bin/start.sh

Thanks,
Alejandro

On 2/29/16, 11:52 AM, "Di Li" <lo...@yahoo.com.INVALID> wrote:

>Hello folks,
>
>I notice many services uses ${hdp.version} in their Python scripts.  I
>yet failed to locate the logic in Ambari code that shows how hdp.version
>is calculated to an exact value based on the stack.
>
>Could someone please give me some points on how hdp.version is calculated
>?
>
>Thanks.
>
>Di.