ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 33430: Configuration Versions Should Be Calculated By the Database
Date Wed, 22 Apr 2015 12:48:46 GMT

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

Ship it!


Ship It!

- Tom Beerbower


On April 22, 2015, 4:14 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33430/
> -----------------------------------------------------------
> 
> (Updated April 22, 2015, 4:14 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10639
>     https://issues.apache.org/jira/browse/AMBARI-10639
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ConfigVersionHelper}} is used by Ambari to determine the "next" version when creating
configuration versions and service configuration versions. This presents two problems:
> 
> - In a distributed system, have an in-memory atomic does not work. When Ambari becomes
HA aware, this will be problematic.
> 
> - It does not support downgrading and removing the current maximum. There would need
to be code added in various places to always remember to decrement this value. The decoupled
nature is prone it error.
> 
> Instead, this class should be removed in favor of calculate this from the database using
a max() function on the column. This will allow removal of configurations during downgrade
to properly revert to the prior configuration version.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java 55e2aef

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceConfigDAO.java
1b9d33d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
68d88ca 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
86b919f 
>   ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
a687c5e 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ConfigVersionHelper.java
a7e9b5a 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
496eda5 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
3cde243 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33430/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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