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


Fix it, then Ship it!




Thanks for submitting this patch. 

Apart from a few minor issues listed below, the patch looks fine to me.


ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
 (line 50)
<https://reviews.apache.org/r/50870/#comment211296>

    Minor issue: 
    
    It might be a good idea to have a common constant defined for this REGEX 
pattern, since it looks like  the ClusterTopologyImpl also uses this pattern as 
well.



ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
 (line 161)
<https://reviews.apache.org/r/50870/#comment211298>

    I would recommend adding some more text this error message, maybe add some 
text to show the property names in question here 
("dfs_ha_initial_namenode_active", "dfs_ha_initial_namenode_standby")
    
    This might make it simpler for debugging, since the error points directly 
to the properties that are configured incorrectly.



ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
 (line 234)
<https://reviews.apache.org/r/50870/#comment211297>

    Same as my comment above, regarding adding the property names here for 
simpler debugging in the future.


- Robert Nettleton


On Aug. 5, 2016, 11:25 p.m., Amruta Borkar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50870/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2016, 11:25 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári and Robert Nettleton.
> 
> 
> Bugs: AMBARI-17951
>     https://issues.apache.org/jira/browse/AMBARI-17951
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari allows user to specify following properties when Namenode HA is 
> enabled, but does not validate for correct mapping.
> 
> "dfs_ha_initial_namenode_active" : "hostname or hostgroup reference",
> "dfs_ha_initial_namenode_standby" : "hostname or hostgroup reference”
> 
> If the values for above properties are mentioned incorrectly following 
> exception is thrown and NAMENODE fails to start.
> 
> WARN namenode.FSNamesystem (FSNamesystem.java:loadFromDisk(692)) - 
> Encountered exception loading fsimage
> java.io.IOException: NameNode is not formatted.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
>  45a8c5c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
>  699b82a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupImpl.java
>  ddbe0b3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
>  0608697 
>   
> ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterTopologyImplTest.java
>  95e58ae 
> 
> Diff: https://reviews.apache.org/r/50870/diff/
> 
> 
> Testing
> -------
> 
> Included test cases in the patch. 
> Testing done for the following validation cases:
> 
> 1. Extra NAMENODE component
> 2. Invalid HOSTGROUP referenced by a property.
> 3. Invalid total number of nodes for NAMENODE HA
> 4. Invalid hostname mapping
> 
> 
> Thanks,
> 
> Amruta Borkar
> 
>

Reply via email to