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 28823: AlertTargets Should Allow AlertGroup Associations To Be Modified From POST
Date Tue, 09 Dec 2014 01:32:30 GMT

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

Ship it!


Looks good.  A couple minor comments ...


ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java
<https://reviews.apache.org/r/28823/#comment106963>

    Could you simply pass groupIds to the ArrayList constructor?
    
        List<Long> ids = new ArrayList<Long>(groupIds);



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
<https://reviews.apache.org/r/28823/#comment106961>

    should be alertGroups?


- Tom Beerbower


On Dec. 8, 2014, 9:57 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28823/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2014, 9:57 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-8595
>     https://issues.apache.org/jira/browse/AMBARI-8595
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When updating or creating an AlertTarget, the AlertGroup associations for that AlertTarget
should be able to modified. 
> 
> {code}
> PUT http://localhost:8080/api/v1/alert_targets/1
> 
> {
>   "AlertTarget": {
>     "groups": [1,2]
>   }
> }
> {code}
> 
> {code}
> POST http://localhost:8080/api/v1/alert_targets/1
> 
> {
>   "AlertTarget": {
>     "name": "Simple",
>     "description": "This target does not work",
>     "notification_type": "FOO",
>     "groups": [1,2,3]
>   }
> }
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java
adb761b 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java
35c9ae4 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
6607fb0 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
146fe49 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
367e6d4 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java
76a9ee2 
> 
> Diff: https://reviews.apache.org/r/28823/diff/
> 
> 
> Testing
> -------
> 
> Manually tested creation and updating groups via the alert target. New unit tests written
to cover new methods and functionality.
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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