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

Review request for Ambari, Alejandro Fernandez, Nate Cole, and Tom Beerbower.


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


Repository: ambari


Description
-------

When making a request for current alerts, if you want to restrict by an ID, 
such as the definition ID, it queries against all entities in the table:

{{api/v1/clusters/perf400/alerts?fields=*&Alert/definition_id=9}}

This can cause performance issues in large clusters. We should be using a JPA 
predicate here.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/controller/AlertCurrentRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java
 53e900f 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 
d44d2e5 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity_.java
 PRE-CREATION 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
 ed543f9 

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


Testing
-------

Tests running now...


Thanks,

Jonathan Hurley

Reply via email to