[ 
https://issues.apache.org/jira/browse/AMBARI-11566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566721#comment-14566721
 ] 

Hudson commented on AMBARI-11566:
---------------------------------

SUCCESS: Integrated in Ambari-trunk-Commit #2765 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/2765/])
AMBARI-11566 - Alert Definition Source Field Has Numerical Values Converted To 
Strings On Creation Or Update (jonathanhurley) (jhurley: 
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d959fa23aae1437e48ce06d18e05f0dd88f31b01)
* 
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java
* 
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java


> Alert Definition Source Field Has Numerical Values Converted To Strings On 
> Creation Or Update
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-11566
>                 URL: https://issues.apache.org/jira/browse/AMBARI-11566
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Jonathan Hurley
>            Assignee: Jonathan Hurley
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-11566.patch
>
>
> When creating or updating an alert definition from the API, any numerical 
> values in the {{source}} element are converted into {{String}} and stored in 
> the database as such. This causes de-serialization problems for definitions 
> on Ambari Server restart.
> The problem stems from how Ambari converts the JSON body to a Map inside of 
> {{JsonRequestBodyParser}}. This uses a {{Map<String,String>}} instead of a 
> {{Map<String,Object>}}. As a result, the {{JsonObject}} has it's {{asText()}} 
> method used to retrieve the value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to