ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 34811: Alert Provider Does Not Return Results Paginated From An Offset
Date Fri, 29 May 2015 14:59:20 GMT

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

Ship it!


Looks good.

- Tom Beerbower


On May 29, 2015, 2:36 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34811/
> -----------------------------------------------------------
> 
> (Updated May 29, 2015, 2:36 p.m.)
> 
> 
> 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
> 
>


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