You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2017/02/16 21:12:57 UTC

Review Request 56766: Remove Entities Associated With clusterconfigmapping

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

Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.


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


Repository: ambari


Description
-------

Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)

This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
  ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
  ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
  ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
  ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
  ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
  ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
  ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 

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


Testing
-------

- Cluster deployment from scratch
- New configurations created and reverted to
- Stack upgrade, downgrade, upgrade/finalize
- Configuration group creation

Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:24 min
[INFO] Finished at: 2017-02-16T15:02:06-05:00
[INFO] Final Memory: 59M/661M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On Feb. 17, 2017, 5:10 a.m., Sebastian Toader wrote:
> > ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql, line 75
> > <https://reviews.apache.org/r/56766/diff/1/?file=1637981#file1637981line75>
> >
> >     Do we need the ```selected``` field at all? This information could be derived from ```selected_timestamp``` field. The record with the largest type in ```selected_timestamp``` for a config type is the selected one. Or this would add too much complexity and performance hit to the queries like ```ClusterConfigEntity.findEnabledConfigsByTypes``` ?

Technically, we could probably get away with it and infer what is selected. However, I think that makes the queries much more complex. Additionally, it becomes harder to determine what's selected by looking at the database when diagnosing issues. There are also queries which rely on `selected = 1` which would need to change to a correlated query with an aggregate function like MAX()


- Jonathan


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


On Feb. 16, 2017, 4:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2017, 4:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Sebastian Toader <st...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56766/#review165919
-----------------------------------------------------------




ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql (line 75)
<https://reviews.apache.org/r/56766/#comment237763>

    Do we need the ```selected``` field at all? This information could be derived from ```selected_timestamp``` field. The record with the largest type in ```selected_timestamp``` for a config type is the selected one. Or this would add too much complexity and performance hit to the queries like ```ClusterConfigEntity.findEnabledConfigsByTypes``` ?


- Sebastian Toader


On Feb. 16, 2017, 10:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2017, 10:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Sebastian Toader <st...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56766/#review165934
-----------------------------------------------------------


Ship it!




Ship It!

- Sebastian Toader


On Feb. 17, 2017, 2:09 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 17, 2017, 2:09 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java fddbb6a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56766/#review165940
-----------------------------------------------------------


Ship it!




Ship It!

- Nate Cole


On Feb. 17, 2017, 8:09 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 17, 2017, 8:09 a.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java fddbb6a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56766/
-----------------------------------------------------------

(Updated Feb. 17, 2017, 8:09 a.m.)


Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.


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


Repository: ambari


Description
-------

Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)

This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
  ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
  ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
  ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
  ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java fddbb6a 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
  ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
  ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
  ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
  ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 

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


Testing
-------

- Cluster deployment from scratch
- New configurations created and reverted to
- Stack upgrade, downgrade, upgrade/finalize
- Configuration group creation

Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:24 min
[INFO] Finished at: 2017-02-16T15:02:06-05:00
[INFO] Final Memory: 59M/661M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On Feb. 16, 2017, 4:55 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java, line 227
> > <https://reviews.apache.org/r/56766/diff/1/?file=1637969#file1637969line227>
> >
> >     Looks like a NOOP. Should be deleted?

Ah, yes, I think this is covered by the above query which checks against the service configs. I shall remove it.


> On Feb. 16, 2017, 4:55 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java, line 2562
> > <https://reviews.apache.org/r/56766/diff/1/?file=1637979#file1637979line2562>
> >
> >     Any reason for copy here? Doesn't look like original collection is modified.

Hmmmmm - I think I was copying it to get it into a list in order to find by ID - however, this wasn't needed, so I can remove this as well.


- Jonathan


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


On Feb. 16, 2017, 4:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2017, 4:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On Feb. 16, 2017, 4:55 p.m., Sid Wagle wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java, line 227
> > <https://reviews.apache.org/r/56766/diff/1/?file=1637969#file1637969line227>
> >
> >     Looks like a NOOP. Should be deleted?
> 
> Jonathan Hurley wrote:
>     Ah, yes, I think this is covered by the above query which checks against the service configs. I shall remove it.

This check is actually now covered by `GET_NOT_SELECTED_SERVICE_CONFIGS_QUERY`, so the entire method can be removed. Without `clusterconfigmapping`, there's no need to run a check to see if it's in sync with `clusterconfig`.


- Jonathan


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


On Feb. 16, 2017, 4:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2017, 4:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 56766: Remove Entities Associated With clusterconfigmapping

Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56766/#review165884
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java (line 227)
<https://reviews.apache.org/r/56766/#comment237716>

    Looks like a NOOP. Should be deleted?



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java (line 194)
<https://reviews.apache.org/r/56766/#comment237717>

    minor nit: "may not be selected"



ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java (line 2560)
<https://reviews.apache.org/r/56766/#comment237718>

    Any reason for copy here? Doesn't look like original collection is modified.


- Sid Wagle


On Feb. 16, 2017, 9:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56766/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2017, 9:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, Sebastian Toader, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20054
>     https://issues.apache.org/jira/browse/AMBARI-20054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Please see the Epic (https://issues.apache.org/jira/browse/AMBARI-20053) for a full description. Additionally, supporting work (such as Ambari upgrade) is tracked in that epic via other Jiras (like AMBARI-20055)
> 
> This review is for AMBARI-20054, which tracks the work needed to remove the `clusterconfigmapping` table and transfer its responsibility into the `clusterconfig` table.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java 926ec65 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java d35fc1a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b727c72 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java d14e60e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntity.java 5748dc9 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigMappingEntityPK.java e5ba5af 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java 2e0a15d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java dae7ef8 
>   ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java 80d05f7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 713c189 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java db4aa21 
>   ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 328fe22 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql f007b53 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql f6cb896 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 19253e8 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b13a9e3 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql cf2954a 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 16c269a 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java a0732ab 
>   ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java 09aaa92 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java 6cdfbad 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java 5b54af4 
>   ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java d418a80 
> 
> Diff: https://reviews.apache.org/r/56766/diff/
> 
> 
> Testing
> -------
> 
> - Cluster deployment from scratch
> - New configurations created and reverted to
> - Stack upgrade, downgrade, upgrade/finalize
> - Configuration group creation
> 
> Tests run: 4918, Failures: 0, Errors: 0, Skipped: 39
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:24 min
> [INFO] Finished at: 2017-02-16T15:02:06-05:00
> [INFO] Final Memory: 59M/661M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>