Skip to content

Commit c431095

Browse files
committed
Add a comment and fix the code style
1 parent 2de96e5 commit c431095

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/storage/DiskStore.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ private[spark] class DiskStore(blockManager: BlockManager, diskManager: DiskBloc
7777
try {
7878
blockManager.dataSerializeStream(blockId, outputStream, values)
7979
} finally {
80+
// Close outputStream here because it should be closed before file is deleted.
8081
outputStream.close()
8182
}
8283
} catch {
8384
case e: Throwable => {
84-
if(file.exists()) {
85+
if (file.exists()) {
8586
file.delete()
8687
}
8788
throw e

0 commit comments

Comments
 (0)