Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-11566

Alert Definition Source Field Has Numerical Values Converted To Strings On Creation Or Update

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • ambari-server
    • None

    Description

      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.

      Attachments

        1. AMBARI-11566.patch
          9 kB
          Jonathan Hurley

        Issue Links

          Activity

            People

              jonathanhurley Jonathan Hurley
              jonathanhurley Jonathan Hurley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: