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

    https://github.com/apache/spark/pull/577#discussion_r12257197
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/DiskStore.scala ---
    @@ -77,7 +77,12 @@ private class DiskStore(blockManager: BlockManager, 
diskManager: DiskBlockManage
         val startTime = System.currentTimeMillis
         val file = diskManager.getFile(blockId)
         val outputStream = new FileOutputStream(file)
    -    blockManager.dataSerializeStream(blockId, outputStream, values)
    +    try {
    +      blockManager.dataSerializeStream(blockId, outputStream, values)
    +    }
    +    finally {
    +      outputStream.close
    +    }
    --- End diff --
    
    If you actually want to handle this case; you should delete the file in 
case write failed.


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

Reply via email to