ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Review Request 42853: Alerts API Does Not Honor JPA Sorting
Date Wed, 27 Jan 2016 15:01:27 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42853/
-----------------------------------------------------------

Review request for Ambari, Alejandro Fernandez, Dmytro Sen, and Nate Cole.


Bugs: AMBARI-14812
    https://issues.apache.org/jira/browse/AMBARI-14812


Repository: ambari


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}}.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java
263a7b8 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java
0492860 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java 0bbe998


Diff: https://reviews.apache.org/r/42853/diff/


Testing
-------

mvn clean test


Thanks,

Jonathan Hurley


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message