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

Review request for Ambari, Dmytro Grinenko, Di Li, Dmitro Lisnichenko, Jonathan 
Hurley, Jayush Luniya, Nate Cole, and Tim Thorpe.


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


Repository: ambari


Description
-------

Fresh install of HDP 2.5 does not have a version for ATLAS_SERVER or 
ATLAS_CLIENT in the database (hostcomponentstate table) because ATLAS has 
advertise_version as "false".

Atlas in common-services for has the following,
0.1.0.2.3 has versionAdvertised=false
0.7.0.2.5 has versionAdvertised=true

However, the current logic in ComponentModule always take the value of the 
parent, which is incorrect.

To fix this, if the current component has false, then take the value of the 
parent.

The ideal way to do this is to use another variable (a string) to read from the 
xml file so we can store "true", "false", null. If that variable is null, then 
inherit from the parent.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java 
d9d3105 
  ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/metainfo.xml 
630d403 
  
ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java
 f21b250 

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


Testing
-------

Added unit test. Waiting for full unit test results.

Verified via the api,
/api/v1/stacks/HDP/2.5/services/ATLAS/components has advertise_version=false
/api/v1/stacks/HDP/2.5/services/ATLAS/components has advertise_version=true

Also tested with Storm, which has 4 versions inside common-services, by setting 
the metainfo.xml file for all versions  with versionAdvertised=false, which 
yielded advertise_version=false for all versions via the API, and then
changing only the first metainfo.xml file to versionAdvertised=true in 
metainfo.xml, which yielded all versions via the API reporting 
advertise_version=true


Thanks,

Alejandro Fernandez

Reply via email to