Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DD7B18B38 for ; Wed, 27 Jan 2016 14:57:42 +0000 (UTC) Received: (qmail 72608 invoked by uid 500); 27 Jan 2016 14:57:40 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 72471 invoked by uid 500); 27 Jan 2016 14:57:40 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 71979 invoked by uid 99); 27 Jan 2016 14:57:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2016 14:57:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2A7972C1F75 for ; Wed, 27 Jan 2016 14:57:40 +0000 (UTC) Date: Wed, 27 Jan 2016 14:57:40 +0000 (UTC) From: "Jonathan Hurley (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AMBARI-14812) Alerts API Does Not Honor JPA Sorting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jonathan Hurley created AMBARI-14812: ---------------------------------------- Summary: Alerts API Does Not Honor JPA Sorting Key: AMBARI-14812 URL: https://issues.apache.org/jira/browse/AMBARI-14812 Project: Ambari Issue Type: Bug Components: ambari-server Affects Versions: 2.0.0 Reporter: Jonathan Hurley Assignee: Jonathan Hurley Fix For: 2.2.2 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}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)