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:05:17 UTC

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

Jonathan Hurley created AMBARI-11566:
----------------------------------------

             Summary: 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


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)