The rolling upgrade feature takes advantage of versioned packages.
Package names have the following format:
<HDP-component>_<HDP-version>-<component-package>
For example:
hadoop_2_2_6_0_2800-hdfs
HDP 2.2 components are located at
/usr/hdp/<HDP-version>/<HDP-component>
. The /usr/hdp/current
subdirectory contains links to the active HDP version for each component.