-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34811/
-----------------------------------------------------------
Review request for Ambari, Nate Cole and Tom Beerbower.
Bugs: AMBARI-11520
https://issues.apache.org/jira/browse/AMBARI-11520
Repository: ambari
Description
-------
When requesting the current alerts for a cluster, the following URL returns no
results even if there are alerts which would match the pagination criteria:
{{api/v1/clusters/c1/alerts?fields=*&Alert/state.in(CRITICAL,WARNING)&Alert/maintenance_state.in(OFF)&from=10&page_size=10}}
However, the following URL does return alerts:
{{api/v1/clusters/c1/alerts?fields=*&Alert/state.in(CRITICAL,WARNING)&Alert/maintenance_state.in(OFF)&page_size=10}}
The backend DAO is correctly processing the predicate into a JPA predicate,
however the result set is being trimmed in memory before being returned from
the query.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProvider.java
f21c4ab
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java
a25cba0
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
0c4942e
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProviderTest.java
0367dd3
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
5459a8c
Diff: https://reviews.apache.org/r/34811/diff/
Testing
-------
mvn clean test
Thanks,
Jonathan Hurley