wu-sheng commented on a change in pull request #6888:
URL: https://github.com/apache/skywalking/pull/6888#discussion_r633103696



##########
File path: 
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java
##########
@@ -50,23 +62,160 @@ private AlarmQueryService getQueryService() {
         return queryService;
     }
 
+    private EventQueryService getEventQueryService() {
+        if (eventQueryService == null) {
+            this.eventQueryService = 
moduleManager.find(CoreModule.NAME).provider().getService(EventQueryService.class);
+        }
+        return eventQueryService;
+    }
+
     public AlarmTrend getAlarmTrend(final Duration duration) {
         return new AlarmTrend();
     }
 
     public Alarms getAlarm(final Duration duration, final Scope scope, final 
String keyword,
-                           final Pagination paging, final List<Tag> tags) 
throws IOException {
+                           final Pagination paging, final List<Tag> tags) 
throws Throwable {

Review comment:
       Why `Throwable`? This is rarely to see in the codes.

##########
File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/EventQueryService.java
##########
@@ -53,6 +56,14 @@ public Events queryEvents(final EventQueryCondition 
condition) throws Exception
         return getDao().queryEvents(condition);
     }
 
+    public Events queryEvents(final List<EventQueryCondition> conditions) 
throws Exception {

Review comment:
       I can't see any change about this. Could you explain more?

##########
File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/event/Source.java
##########
@@ -29,4 +30,18 @@
     private String service;
     private String serviceInstance;
     private String endpoint;
+
+    public String getSourcesStr() {

Review comment:
       I am super confused about this logic, every entity has a very clear ID 
rule, managed by `IDManager` in SkyWalking. Why do you create so many of this 
kind of method in here and `AlarmMessage`?
   The codes seem to be changed randomly.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to