hit-lacus edited a comment on pull request #1538:
URL: https://github.com/apache/kylin/pull/1538#issuecomment-754652429


   Following is my suggestion:
   
   You are using event flow : **SparderMetricsListener**  -> 
**QuerySparkMetrics**  -> **QueryService/QueryMetricsFacade** -> MetricsSystem, 
I think it is OK if you send MetricsEvent direct to MetricsSystem : 
**SparderMetricsListener** -> **QuerySparkMetrics** -> **MetricsSystem**.
   
   In the previous implementation, when a query is finished, all metrics data 
are collected because query and metrics collection are in the same thread. But 
in the new implementation, SparkListener and QueryService are not in the same 
thread, so the order is not guaranteed . I guess you can call 
`MetricsManager.update` to send metrics event in `QuerySparkMetrics` directly .


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