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 2016/04/19 05:14:25 UTC

[jira] [Assigned] (SPARK-14701) checkpointWriter is stopped before eventLoop. Hence rejectedExecution exception is coming in StreamingContext.stop

     [ https://issues.apache.org/jira/browse/SPARK-14701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-14701:
------------------------------------

    Assignee: Apache Spark

> checkpointWriter is stopped before eventLoop. Hence rejectedExecution exception is coming in StreamingContext.stop
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-14701
>                 URL: https://issues.apache.org/jira/browse/SPARK-14701
>             Project: Spark
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.5.1, 1.6.1
>         Environment: Windows, local[*] mode as well as  Redhat Linux , Yarn Cluster
>            Reporter: Sreelal S L
>            Assignee: Apache Spark
>            Priority: Minor
>
> In org.apache.spark.streaming.scheduler.JobGenerator.stop() , the checkpointWriter.stop is called before eventLoop.stop.
> If i call the streamingContext.stop when a batch is about to complete(Im invoking it from a StreamingListener.onBatchCompleted callback) , a rejectedException may get thrown from checkPointWriter.executor, since the eventLoop will try to process DoCheckpoint events even after the checkPointWriter.executor was stopped.
> 16/04/18 19:22:10 ERROR CheckpointWriter: Could not submit checkpoint task to the thread pool executor
> java.util.concurrent.RejectedExecutionException: Task org.apache.spark.streaming.CheckpointWriter$CheckpointWriteHandler@76e12f8 rejected from java.util.concurrent.ThreadPoolExecutor@4b9f5b97[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 49]
> 	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
> 	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821)
> 	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372)
> 	at org.apache.spark.streaming.CheckpointWriter.write(Checkpoint.scala:253)
> 	at org.apache.spark.streaming.scheduler.JobGenerator.doCheckpoint(JobGenerator.scala:294)
> 	at org.apache.spark.streaming.scheduler.JobGenerator.org$apache$spark$streaming$scheduler$JobGenerator$$processEvent(JobGenerator.scala:184)
> 	at org.apache.spark.streaming.scheduler.JobGenerator$$anon$1.onReceive(JobGenerator.scala:87)
> 	at org.apache.spark.streaming.scheduler.JobGenerator$$anon$1.onReceive(JobGenerator.scala:86)
> 	at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)
> I think the order of the stopping should be changed. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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