Re: Review Request 44956: Topology host info is not cleared when a host is removed

2016-03-19 Thread Sebastian Toader

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




ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
 (line 780)


Please ensure that this method runs within a transaction by using 
@Transactional annotation



ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
 (line 175)


Looks like unfinished comment


- Sebastian Toader


On March 17, 2016, 1:59 p.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44956/
> ---
> 
> (Updated March 17, 2016, 1:59 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Laszlo Puskas, Oliver Szabo, 
> Sandor Magyari, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-15457
> https://issues.apache.org/jira/browse/AMBARI-15457
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When a host is removed, a record is left in the topology_host_info table. As 
> a result re-adding the same host is not possible, due to invalid topology.
> Host removal should remove the corresponding record from topology_host_info 
> as well.
> 
> A new column with a foreign key to hosts table is added. In addition 
> ClusterTopologyImpl was statefull and hostGroupInfoMap was not updated when a 
> host was removed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
>  6101ee8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostInfoEntity.java
>  a4f251a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
>  46dd49d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
>  4e178c0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
>  003539c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java
>  4847a11 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java
>  dbf6735 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
>  b878955 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
>  41f3150 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  8267d5d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql dee397f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 253b5d7 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 832d1bc 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 6c8a09d 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a6acb74 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 2957c5c 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  3e43ef1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
>  69c570e 
> 
> Diff: https://reviews.apache.org/r/44956/diff/
> 
> 
> Testing
> ---
> 
> Tests ran without failures. (2016-03-17 13:30)
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>



Re: Review Request 44956: Topology host info is not cleared when a host is removed

2016-03-19 Thread Sebastian Toader

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


Ship it!




Ship It!

- Sebastian Toader


On March 18, 2016, 10:27 a.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44956/
> ---
> 
> (Updated March 18, 2016, 10:27 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Laszlo Puskas, Oliver Szabo, 
> Sandor Magyari, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-15457
> https://issues.apache.org/jira/browse/AMBARI-15457
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When a host is removed, a record is left in the topology_host_info table. As 
> a result re-adding the same host is not possible, due to invalid topology.
> Host removal should remove the corresponding record from topology_host_info 
> as well.
> 
> A new column with a foreign key to hosts table is added. In addition 
> ClusterTopologyImpl was statefull and hostGroupInfoMap was not updated when a 
> host was removed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
>  6101ee8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostInfoEntity.java
>  a4f251a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
>  46dd49d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
>  4e178c0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
>  003539c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java
>  4847a11 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java
>  dbf6735 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
>  b878955 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
>  41f3150 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  8267d5d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql dee397f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 253b5d7 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 832d1bc 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 6c8a09d 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a6acb74 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 2957c5c 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  3e43ef1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
>  69c570e 
> 
> Diff: https://reviews.apache.org/r/44956/diff/
> 
> 
> Testing
> ---
> 
> Tests ran without failures. (2016-03-17 13:30)
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>



Review Request 44956: Topology host info is not cleared when a host is removed

2016-03-19 Thread Daniel Gergely

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

Review request for Ambari, Alejandro Fernandez, Laszlo Puskas, Oliver Szabo, 
Sandor Magyari, Sumit Mohanty, and Sebastian Toader.


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


Repository: ambari


Description
---

When a host is removed, a record is left in the topology_host_info table. As a 
result re-adding the same host is not possible, due to invalid topology.
Host removal should remove the corresponding record from topology_host_info as 
well.

A new column with a foreign key to hosts table is added. In addition 
ClusterTopologyImpl was statefull and hostGroupInfoMap was not updated when a 
host was removed.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
 6101ee8 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostInfoEntity.java
 a4f251a 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
 46dd49d 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
 4e178c0 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
 003539c 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java
 4847a11 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java
 dbf6735 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
 b878955 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 41f3150 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 8267d5d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql dee397f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 253b5d7 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 832d1bc 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
6c8a09d 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a6acb74 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 2957c5c 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 3e43ef1 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
 69c570e 

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


Testing
---

Tests ran without failures. (2016-03-17 13:30)


Thanks,

Daniel Gergely



Re: Review Request 44956: Topology host info is not cleared when a host is removed

2016-03-19 Thread Alejandro Fernandez

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
 (line 910)


Move up a couple of lines to be with the other DAOs.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 (line 145)


May need to ensure this is idempotent.


- Alejandro Fernandez


On March 17, 2016, 12:59 p.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44956/
> ---
> 
> (Updated March 17, 2016, 12:59 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Laszlo Puskas, Oliver Szabo, 
> Sandor Magyari, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-15457
> https://issues.apache.org/jira/browse/AMBARI-15457
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When a host is removed, a record is left in the topology_host_info table. As 
> a result re-adding the same host is not possible, due to invalid topology.
> Host removal should remove the corresponding record from topology_host_info 
> as well.
> 
> A new column with a foreign key to hosts table is added. In addition 
> ClusterTopologyImpl was statefull and hostGroupInfoMap was not updated when a 
> host was removed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
>  6101ee8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostInfoEntity.java
>  a4f251a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
>  46dd49d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
>  4e178c0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
>  003539c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java
>  4847a11 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java
>  dbf6735 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
>  b878955 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
>  41f3150 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  8267d5d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql dee397f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 253b5d7 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 832d1bc 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 6c8a09d 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a6acb74 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 2957c5c 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  3e43ef1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
>  69c570e 
> 
> Diff: https://reviews.apache.org/r/44956/diff/
> 
> 
> Testing
> ---
> 
> Tests ran without failures. (2016-03-17 13:30)
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>



Re: Review Request 44956: Topology host info is not cleared when a host is removed

2016-03-18 Thread Daniel Gergely

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

(Updated márc. 18, 2016, 9:27 de)


Review request for Ambari, Alejandro Fernandez, Laszlo Puskas, Oliver Szabo, 
Sandor Magyari, Sumit Mohanty, and Sebastian Toader.


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


Repository: ambari


Description
---

When a host is removed, a record is left in the topology_host_info table. As a 
result re-adding the same host is not possible, due to invalid topology.
Host removal should remove the corresponding record from topology_host_info as 
well.

A new column with a foreign key to hosts table is added. In addition 
ClusterTopologyImpl was statefull and hostGroupInfoMap was not updated when a 
host was removed.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
 6101ee8 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostInfoEntity.java
 a4f251a 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
 46dd49d 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
 4e178c0 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
 003539c 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java
 4847a11 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java
 dbf6735 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
 b878955 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 41f3150 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
 8267d5d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql dee397f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 253b5d7 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 832d1bc 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
6c8a09d 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a6acb74 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 2957c5c 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 3e43ef1 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
 69c570e 

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


Testing
---

Tests ran without failures. (2016-03-17 13:30)


Thanks,

Daniel Gergely



Re: Review Request 44956: Topology host info is not cleared when a host is removed

2016-03-18 Thread Sandor Magyari

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


Ship it!




Ship It!

- Sandor Magyari


On March 18, 2016, 9:27 a.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44956/
> ---
> 
> (Updated March 18, 2016, 9:27 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Laszlo Puskas, Oliver Szabo, 
> Sandor Magyari, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-15457
> https://issues.apache.org/jira/browse/AMBARI-15457
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When a host is removed, a record is left in the topology_host_info table. As 
> a result re-adding the same host is not possible, due to invalid topology.
> Host removal should remove the corresponding record from topology_host_info 
> as well.
> 
> A new column with a foreign key to hosts table is added. In addition 
> ClusterTopologyImpl was statefull and hostGroupInfoMap was not updated when a 
> host was removed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
>  6101ee8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/TopologyHostInfoDAO.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostInfoEntity.java
>  a4f251a 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
>  46dd49d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopology.java
>  4e178c0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterTopologyImpl.java
>  003539c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java
>  4847a11 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java
>  dbf6735 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
>  b878955 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
>  41f3150 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
>  8267d5d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql dee397f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 253b5d7 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 832d1bc 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 
> 6c8a09d 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a6acb74 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 2957c5c 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  3e43ef1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
>  69c570e 
> 
> Diff: https://reviews.apache.org/r/44956/diff/
> 
> 
> Testing
> ---
> 
> Tests ran without failures. (2016-03-17 13:30)
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>