You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ta...@apache.org on 2019/08/27 14:29:29 UTC

[skywalking] branch alarm_order created (now e7c8993)

This is an automated email from the ASF dual-hosted git repository.

tanjian pushed a change to branch alarm_order
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at e7c8993  set alarm record ordered by start time desc.

This branch includes the following new commits:

     new e7c8993  set alarm record ordered by start time desc.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking] 01/01: set alarm record ordered by start time desc.

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tanjian pushed a commit to branch alarm_order
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit e7c8993987b8c5334662cf95c5a2d00364fafaca
Author: Jared.Tan <ji...@daocloud.io>
AuthorDate: Tue Aug 27 22:28:57 2019 +0800

    set alarm record ordered by start time desc.
---
 .../oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java
index 3c0a304..4a3f525 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AlarmQueryEsDAO.java
@@ -30,6 +30,7 @@ import org.elasticsearch.action.search.SearchResponse;
 import org.elasticsearch.index.query.*;
 import org.elasticsearch.search.SearchHit;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
+import org.elasticsearch.search.sort.SortOrder;
 
 /**
  * @author peng-yongsheng
@@ -57,7 +58,7 @@ public class AlarmQueryEsDAO extends EsDAO implements IAlarmQueryDAO {
             boolQueryBuilder.must().add(QueryBuilders.matchPhraseQuery(matchCName, keyword));
         }
 
-        sourceBuilder.query(boolQueryBuilder);
+        sourceBuilder.query(boolQueryBuilder).sort(AlarmRecord.START_TIME, SortOrder.DESC);
         sourceBuilder.size(limit);
         sourceBuilder.from(from);