Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Such properties can be defined in .json format in the properties folder of the stack. 

 + 

Stack features

 

Stacks can support different features depending on their version, for example: upgrade support, NFS support, support for specific new components (such as Ranger, Phoenix )…

...

This is an example where the new stack featurization design is used in service code:  

Code Block
languagepy
titlestack featurization example
    if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version):
      conf_select.select(params.stack_name, "hive", params.version)
      stack_select.select("hive-server2", params.version)

 

Stack Tools


Similar to stack features, stack-selector and conf-selector tools are now stack-driven instead of hardcoding hdp-select and conf-select. They are defined in stack_tools.json file under /HDP/2.0.6/properties 

And declared as part of the HDP stack configurations as a new property on /HDP/2.0.6/configuration/cluster-env.xml

Code Block
languagexml
title/HDP/2.0.6/configuration/cluster-env.xml
  <!-- Define stack_tools property in the base stack. DO NOT override this property for each stack version -->
  <property>
    <name>stack_tools</name>
    <value/>
    <description>Stack specific tools</description>
    <property-type>VALUE_FROM_PROPERTY_FILE</property-type>
    <value-attributes>
      <property-file-name>stack_tools.json</property-file-name>
      <property-file-type>json</property-file-type>
      <read-only>true</read-only>
      <overridable>false</overridable>
      <visible>false</visible>
    </value-attributes>
    <on-ambari-upgrade add="true"/>
  </property>

 

Corresponding helper functions have been added in resource_management/libraries/functions/stack_tools.py. These helper functions are used to remove hardcodings in resource_management library.