You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/01/21 09:09:57 UTC
[08/10] git commit: Adding small code comment
Adding small code comment
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/a917a87e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/a917a87e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/a917a87e
Branch: refs/heads/master
Commit: a917a87e02c5f094f81fa7f9e1702135f440da82
Parents: d46df96
Author: Patrick Wendell <pw...@gmail.com>
Authored: Mon Jan 20 23:11:45 2014 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Mon Jan 20 23:11:45 2014 -0800
----------------------------------------------------------------------
.../main/scala/org/apache/spark/storage/BlockObjectWriter.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/a917a87e/core/src/main/scala/org/apache/spark/storage/BlockObjectWriter.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/storage/BlockObjectWriter.scala b/core/src/main/scala/org/apache/spark/storage/BlockObjectWriter.scala
index 924ec7c..530712b 100644
--- a/core/src/main/scala/org/apache/spark/storage/BlockObjectWriter.scala
+++ b/core/src/main/scala/org/apache/spark/storage/BlockObjectWriter.scala
@@ -146,7 +146,8 @@ private[spark] class DiskBlockObjectWriter(
override def commit(): Long = {
if (initialized) {
- // NOTE: Flush the serializer first and then the compressed/buffered output stream
+ // NOTE: Because Kryo doesn't flush the underlying stream we explicitly flush both the
+ // serializer stream and the lower level stream.
objOut.flush()
bs.flush()
val prevPos = lastValidPosition