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 25216: Alerts: Implement Property Updates for Alert Targets
Date Sun, 31 Aug 2014 20:47:24 GMT

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

Ship it!


Ship It!

- Nate Cole


On Aug. 31, 2014, 8:31 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25216/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2014, 8:31 a.m.)
> 
> 
> Review request for Ambari and Nate Cole.
> 
> 
> Bugs: AMBARI-7094
>     https://issues.apache.org/jira/browse/AMBARI-7094
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Alert Targets should have the ability to contain an unstructured set of properties so
that customer defined targets (and dispatchers) can still be stored and retrieved by Ambari.
> 
> The initial design had a defined structure for both email and snmp protocols. However,
these properties were just turned into a flat set by the data layer. 
> 
> For the initial approach, it doesn't make much sense to try to model structured properties
when, at the end of the day, they need to be serialized to a map.
> 
> 
>     "AlertTarget": {
>       "name": "Administrators",
>       "description": "The Admins",
>       "notification_type": "EMAIL",
>       "properties":{
>         "mail.smtp.host": "my.host.net",
>         "mail.smtp.port" : "587",
>         ...
>       }
>     }
> 
> 
> This also lets any property defined be passed to the backend provider in order to properly
dispatch to the targets. 
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java
1a6309770b2de8cef1b716163a47a0b5dddef803 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java
86281b3be19919fb9ab3a2e56fa4f763f5f5d2fc 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java
59dd1afa51586d14c30522825e4fa34ff4cee86a 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java
e00f60f198300f51ee0e54cffded5d152e837512 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ConfigFactory.java 28dfc1c0e1a9cb2e33fc0dcef1924c48aae5c714

>   ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertTarget.java f495787212d375a8e20784b92db9eab3c216e1a4

>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
6ca2035f1482753b9cd08bac7da9038caef90bec 
> 
> Diff: https://reviews.apache.org/r/25216/diff/
> 
> 
> Testing
> -------
> 
> $ mvn clean test
> 
> New tests added to cover update functionality.
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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