Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17135#discussion_r104077712
  
    --- Diff: 
core/src/main/scala/org/apache/spark/rdd/ReliableCheckpointRDD.scala ---
    @@ -279,8 +287,13 @@ private[spark] object ReliableCheckpointRDD extends 
Logging {
     
         // Register an on-task-completion callback to close the input stream.
         context.addTaskCompletionListener(context => deserializeStream.close())
    -
    -    deserializeStream.asIterator.asInstanceOf[Iterator[T]]
    +    Utils.tryWithSafeFinally {
    --- End diff --
    
    This code will introduce issue, `deserializaStream` should be called after 
finished, the code here will close this stream prematurely.
    
    Also please look at L289, it already takes care of `close` after the task 
is finished.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to