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

Alerts API Does Not Honor JPA Sorting

    XMLWordPrintableJSON

Details

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

    Description

      Sorted API requests to the alerts endpoint results in data which is not sorted at all. Consider this query:

      http://localhost:8080/api/v1/clusters/c1/alerts?fields=Alert/latest_timestamp&sortBy=Alert/latest_timestamp

      The data is returned out of order. This is because the JPA sort is being placed into a HashSet instead of a LinkedHashSet.

      Attachments

        1. AMBARI-14812.patch
          5 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: