ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 26568: Alerts: Create REST API Endpoint for Alert History
Date Fri, 10 Oct 2014 21:22:57 GMT

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

Ship it!



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity_.java
<https://reviews.apache.org/r/26568/#comment96549>

    Why not import annotations?  I've noticed you do this other places, but isn't consistent
with other parts of the code.  Also, I think as long as the annotation StaticMetamodel is
there you don't need that wonky _ character.



ambari-server/src/main/resources/key_properties.json
<https://reviews.apache.org/r/26568/#comment96551>

    On Tom's suggestion, I've been trying not to use key_properties and properties.json, instead
just doing it in code.  It's worked ok on my short foray into RU.  It's ok that you do, but
it works from code too.


- Nate Cole


On Oct. 10, 2014, 2:48 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26568/
> -----------------------------------------------------------
> 
> (Updated Oct. 10, 2014, 2:48 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-7734
>     https://issues.apache.org/jira/browse/AMBARI-7734
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Alert history is exposed as read-only. Since this data can grow without bounds, the current
API model of manipulating the entire result set in memory is not viable long term. 
> 
> This patch will pass the Ambari Predicate down to the DAO which will then turn the Predicate
into a JPA Predicate capable of being handed to a CriteriaQuery. This will allow JPA to do
most of the work in reducing the requested result set.
> 
> Missing from this are pagination and sorting. That will be a separate change coming next
where the ResourceProviders are given both, and if possible, can apply them to the result
set they return.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertHistoryResourceDefinition.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
74580a4 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
a56bcbf 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AlertHistoryRequest.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java e0de383

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
5810633 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProvider.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java f51375b

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java f2161f3

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity_.java
PRE-CREATION 
>   ambari-server/src/main/resources/key_properties.json 085dc11 
>   ambari-server/src/main/resources/properties.json 8a0a58a 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProviderTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java a2023d8

> 
> Diff: https://reviews.apache.org/r/26568/diff/
> 
> 
> Testing
> -------
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 23:24 min
> [INFO] Finished at: 2014-10-10T14:45:44-04:00
> [INFO] Final Memory: 29M/230M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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