-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52027/
-----------------------------------------------------------

Review request for Ambari and Vitalyi Brodetskyi.


Bugs: AMBARI-18415
    https://issues.apache.org/jira/browse/AMBARI-18415


Repository: ambari


Description
-------

In the stack definition if a property of service component is not defined in
one specific version than it will be inherited from the parent version.

The `ComponentInfo.cardinality` always has a default value of "0+" from the
moment the object is instantiated thus the inheritance logic is never applied.
This leads to if a specific version of a service component doesn't have a
property set in stack definition it won't inherit it from its parent but
rather will take the "0+" default value.

This is not the correct behaviour. First the inheritance should be applied and
only set `cardinality` to "0+" only if it can't be inherited from the parents
(as it's not defined in any of the parents up in the inheritance chain)


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java 
537ae32 
  ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 
2dae526 
  
ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java
 905707c 

Diff: https://reviews.apache.org/r/52027/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk

Reply via email to