ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 33340: Add Prerequisite Check for Merged Configs
Date Mon, 20 Apr 2015 17:40:50 GMT


> On April 20, 2015, 1:14 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/ConfigurationMergeCheck.java,
line 98
> > <https://reviews.apache.org/r/33340/diff/1-2/?file=934987#file934987line98>
> >
> >     I thought this was going to be,
> >     Saved = current
> >     New = default value in stack
> >     
> >     Old | Saved  | New  | Result
> >     null  y        y      ok, new prop
> >     x     null     null   conflict
> >     x     y        y      conflict
> >     x     y        x      ok
> >     x     x        x      ok
> >     
> >     if (old != saved) {
> >       if (null == new || (old != new && old != null) {
> >         // conflict
> >       }
> >     }

The premise is this:
   * <ul>
   *   <li>A value that has been customized from HDP 2.2.x.x no longer exists in HDP
2.3.x.x</li>
   *   <li>A value that has been customized from HDP 2.2.x.x has changed its default
value between HDP 2.2.x.x and HDP 2.3.x.x</li>
   * </ul>


Conflicts are a result of saved vs new.
Old | Saved  | New  | Result
null  y        y      ok, new prop
null  y        n      conflict, saved vs stack is different
x     y        y      ok, value won't change from current
x     y        x      ok, since defaults are the same, the saved value will be used (not in
conflict)
x     x        x      ok
x     y        z      conflict, since the saved value is different from new value AND the
old value


- Nate


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


On April 20, 2015, 9:09 a.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33340/
> -----------------------------------------------------------
> 
> (Updated April 20, 2015, 9:09 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10586
>     https://issues.apache.org/jira/browse/AMBARI-10586
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> * Added prereq check for merged configs
> * Fixed host check to handle when a version is specified, to check the proper version
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java 0db235f

>   ambari-server/src/main/java/org/apache/ambari/server/checks/ConfigurationMergeCheck.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheck.java
0db7e2e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProvider.java
ee8cefce 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAO.java
db5e956 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
dd5ac0a 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/PrereqCheckStatus.java
3384b85 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ConfigurationMergeCheckTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/HostsRepositoryVersionCheckTest.java
96151af 
> 
> Diff: https://reviews.apache.org/r/33340/diff/
> 
> 
> Testing
> -------
> 
> Manual cluster testing + Automated:
> 
> Tests run: 2867, Failures: 0, Errors: 0, Skipped: 17
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 22:56.903s
> [INFO] Finished at: Sun Apr 19 09:40:46 EDT 2015
> [INFO] Final Memory: 40M/780M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message