> On Sept. 13, 2016, 2:07 p.m., Di Li wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/DependencyConditionInfo.java,
> >  line 103
> > <https://reviews.apache.org/r/51815/diff/1/?file=1496958#file1496958line103>
> >
> >     do you support other type of checks ? such as the property has to be a 
> > certain value ?

Hi Di,
Yes, property value check is handled by the tag <propertyValue> 
</provertyValue> as given in the document. This tag is optional and if it is 
present, then the blueprint will be validated for the the <propertyValue> 
mentioned in metainfo.xml file. 
This check is performed by following code in isResolved() method:
            //if 'propertyValue' is null then it is assumed that condition only 
checks if the 'property' exists or not
            if(propertyValue == null || 
propertyValue.equals(properties.get(configType).get(property))) return true;

For this scenario (NAMENODE HA) we do not have conditional dependency based on 
propertyValue hence I have not added it in the metainfo.xml file.


> On Sept. 13, 2016, 2:07 p.m., Di Li wrote:
> > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml,
> >  line 58
> > <https://reviews.apache.org/r/51815/diff/1/?file=1496961#file1496961line58>
> >
> >     what does "<property>dfs.nameservices</property>" mean in this 
> > conditional check? as a negative test, what if a user manually added the 
> > property to hdfs-site.xml ?

When a strucutre like <condition> 
                          <configType> .. </configType>
                          <property> ... </property>
                      </condition> 
is present in metainfo.xml file code will look to see if this property is 
present in blueprint. If not then the <dependency> will not be considered 
mandatory. 

I have modified the patch to consider configurations provided in hdfs-site.xml.


> On Sept. 13, 2016, 2:07 p.m., Di Li wrote:
> > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml,
> >  line 55
> > <https://reviews.apache.org/r/51815/diff/1/?file=1496961#file1496961line55>
> >
> >     this is already a subsection of "dependency", it can just be called 
> > "conditions"

Modified the patch.


> On Sept. 13, 2016, 2:07 p.m., Di Li wrote:
> > ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml,
> >  line 56
> > <https://reviews.apache.org/r/51815/diff/1/?file=1496961#file1496961line56>
> >
> >     same here, no need to reiterate it's for "dependency"

Modified the patch.


- Amruta


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


On Sept. 13, 2016, 9:28 p.m., Amruta Borkar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51815/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2016, 9:28 p.m.)
> 
> 
> Review request for Ambari, Shantanu Mundkur, Di Li, Juanjo  Marron, Laszlo 
> Puskas, and Robert Nettleton.
> 
> 
> Bugs: AMBARI-18355
>     https://issues.apache.org/jira/browse/AMBARI-18355
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Currently stack definitions do not list conditional dependencies, adding 
> those to the stack definitions would make it easy to validate errors in case 
> of blueprint deployment. Please refer to document attached to Jira
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/DependencyConditionInfo.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/DependencyInfo.java
>  e3db662 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
>  a5f33ff 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 
> 65d166a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintValidatorImplTest.java
>  b1de8ef 
> 
> Diff: https://reviews.apache.org/r/51815/diff/
> 
> 
> Testing
> -------
> 
> Written Junit test cases. Perfomred manual testing to check the Namenode HA 
> component dependency. Was able to proceed with the installation for valid 
> blueprint. and got validation error message while registering blueprint when 
> the Blueprint did not satisfy the conditional dependencies.
> 
> 
> Thanks,
> 
> Amruta Borkar
> 
>

Reply via email to