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

Ship it!


Looks good.

- Tom Beerbower


On Dec. 9, 2014, 10:24 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28874/
> -----------------------------------------------------------
> 
> (Updated Dec. 9, 2014, 10:24 p.m.)
> 
> 
> Review request for Ambari, Srimanth Gunturi and Tom Beerbower.
> 
> 
> Bugs: AMBARI-8623
>     https://issues.apache.org/jira/browse/AMBARI-8623
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari-1.7.0 the cluster endpoint used to have a summary of host-counts by 
> severity. We need such a field in Ambari-2.0.0.
> {code}
> alerts: {
>  summary: {
>   CRITICAL: 1,
>   OK: 4,
>   PASSIVE: 0,
>   WARNING: 0
>  }
> }
> {code}
> 
> The alerts_summary structure currently returned by the 2.0.0 API are the 
> summary counts of alerts in the system, not those of the hosts. There are 
> alerts that don't have a host (such as aggregate alerts). 
> 
> Add a new field to the cluster endpoint; something like 
> {{alerts_summary_hosts }}
> {noformat}
> http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary_hosts
> {
>   "href" : 
> "http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary_hosts";,
>   "Clusters" : {
>     "cluster_name" : "c1",
>     "version" : "HDP-2.2"
>   },
>   "alerts_summary_hosts" : {
>     "CRITICAL" : 1,
>     "OK" : 41,
>     "UNKNOWN" : 0,
>     "WARNING" : 0
>   }
> }
> {noformat}
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertSummaryPropertyProvider.java
>  e9fef0e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 
> 4908eea 
>   
> ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java
>  6876877 
> 
> Diff: https://reviews.apache.org/r/28874/diff/
> 
> 
> Testing
> -------
> 
> New tests added to cover new summary. 
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>

Reply via email to