You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Jonathan Hurley (JIRA)" <ji...@apache.org> on 2015/05/31 15:39:17 UTC

[jira] [Updated] (AMBARI-11566) Alert Definition Source Field Has Numerical Values Converted To Strings On Creation Or Update

     [ https://issues.apache.org/jira/browse/AMBARI-11566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Hurley updated AMBARI-11566:
-------------------------------------
    Attachment: AMBARI-11566.patch

> 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)