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 2013/10/21 07:20:59 UTC
[6/7] git commit: Making the timing block more narrow for the sync
Making the timing block more narrow for the sync
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/9e9e9e1b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/9e9e9e1b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/9e9e9e1b
Branch: refs/heads/master
Commit: 9e9e9e1b42df26244d29b8920a41177e296a85c4
Parents: b08306c
Author: Patrick Wendell <pw...@gmail.com>
Authored: Mon Oct 7 21:28:12 2013 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Mon Oct 7 21:28:12 2013 -0700
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/storage/DiskStore.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/9e9e9e1b/core/src/main/scala/org/apache/spark/storage/DiskStore.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/storage/DiskStore.scala b/core/src/main/scala/org/apache/spark/storage/DiskStore.scala
index e6d6190..8a8dc8c 100644
--- a/core/src/main/scala/org/apache/spark/storage/DiskStore.scala
+++ b/core/src/main/scala/org/apache/spark/storage/DiskStore.scala
@@ -88,11 +88,11 @@ private class DiskStore(blockManager: BlockManager, rootDirs: String)
if (initialized) {
if (syncWrites) {
// Force outstanding writes to disk and track how long it takes
- val start = System.nanoTime()
objOut.flush()
+ val start = System.nanoTime()
fos.getFD.sync()
- objOut.close()
_timeWriting += System.nanoTime() - start
+ objOut.close()
} else {
objOut.close()
}