ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <jhur...@hortonworks.com>
Subject Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server
Date Fri, 27 Feb 2015 13:25:53 GMT


> On Feb. 27, 2015, 6:38 a.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java,
line 324
> > <https://reviews.apache.org/r/31524/diff/1/?file=879460#file879460line324>
> >
> >     Was this required in addition to upgrading eclipselink to 2.5.2?

Thanks for the review!

Yes, it was. It's because Alert Definitions are based on ID and not cluster name. As a result,
the embedded ClusterEntity is not properly refreshed. This was actually the cause of the issue
that I thought was the same one you were looking at; it's not.

The upgrade to Eclipse 2.5.2 was actually required for the alert notification issue that this
bug fixes. The @CollectionTable annotation doesn't correctly propagate the foreign key deletion
on Postgres in the version that we were using. Upgrading to this version fixed that issue.


- Jonathan


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


On Feb. 26, 2015, 10:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2015, 10:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships
are not refreshed from the database correctly. This causes a problem sending out alert notices
for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java
2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java
a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java
44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c

> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly.
Added and removed alert targets with associated notices and verified the dispatcher picked
up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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