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

    https://github.com/apache/spark/pull/15618#discussion_r85104561
  
    --- Diff: 
core/src/main/scala/org/apache/spark/rdd/ReliableCheckpointRDD.scala ---
    @@ -239,7 +239,14 @@ private[spark] object ReliableCheckpointRDD extends 
Logging {
           val fs = partitionerFilePath.getFileSystem(sc.hadoopConfiguration)
           val fileInputStream = fs.open(partitionerFilePath, bufferSize)
           val serializer = SparkEnv.get.serializer.newInstance()
    -      val deserializeStream = serializer.deserializeStream(fileInputStream)
    +      val deserializeStream = try {
    +        serializer.deserializeStream(fileInputStream)
    +      } catch {
    +        case e : Throwable =>
    +          fileInputStream.close()
    --- End diff --
    
    I am sorry to ask repeatedly but could I please ask how I should change 
this a little bit more?
    I was thinking I should not use `finally` upon `fileInputStream` as it 
should not always be closed at this point or around this point..



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