choojoyq opened a new pull request #25511: [SPARK-22955][DSTREAMS] - graceful 
shutdown shouldn't lead to job gen…
URL: https://github.com/apache/spark/pull/25511
 
 
   ### What changes were proposed in this pull request?
   During graceful shutdown of ``StreamingContext`` ``graph.stop()`` is invoked 
right after stopping of ``timer`` which generates new job. Thus it's possible 
that the latest jobs generated by timer are still in the middle of generation 
but invocation of ``graph.stop()`` closes some objects required to job 
generation, e.g. consumer for Kafka, and generation fails. That also leads to 
fully waiting of ``spark.streaming.gracefulStopTimeout`` which is equal to 10 
batch intervals by default. Stopping of the graph should be performed later, 
after ``haveAllBatchesBeenProcessed`` is completed.
   
   ### How was this patch tested?
   Added test to existing test suite.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to