You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/09/18 08:51:00 UTC

[jira] [Commented] (SPARK-36798) When SparkContext is stopped, metrics system should be flushed after listeners have finished processing

    [ https://issues.apache.org/jira/browse/SPARK-36798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417093#comment-17417093 ] 

Apache Spark commented on SPARK-36798:
--------------------------------------

User 'BOOTMGR' has created a pull request for this issue:
https://github.com/apache/spark/pull/34039

> When SparkContext is stopped, metrics system should be flushed after listeners have finished processing
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-36798
>                 URL: https://issues.apache.org/jira/browse/SPARK-36798
>             Project: Spark
>          Issue Type: Bug
>          Components: Structured Streaming
>    Affects Versions: 2.3.2
>            Reporter: Harsh Panchal
>            Priority: Minor
>
> In current implementation, when {{SparkContext.stop()}} is called, {{metricsSystem.report()}} is called before {{listenerBus.stop()}}. In this case, if some listener is producing some metrics, they would never reach sink.
> Background:
> We have some ingestion jobs in Spark Structured Streaming. To monitor them, collect some metrics like number of input rows, trigger time etc. from {{QueryProgressEvent}} received via {{StreamingQueryListener}}. These metrics are then pushed to DB by custom sinks registered in {{MetricsSystem}}. We noticed that these metrics are lost occasionally for last batch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org