spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/3] git commit: Use flag instead of name check.
Date Mon, 28 Oct 2013 02:11:27 GMT
Use flag instead of name check.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/4261e834
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/4261e834
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/4261e834

Branch: refs/heads/master
Commit: 4261e834cb9c446366569a8dd49d3ba7c1e72ffc
Parents: 596f184
Author: Aaron Davidson <aaron@databricks.com>
Authored: Sat Oct 26 23:53:38 2013 -0700
Committer: Aaron Davidson <aaron@databricks.com>
Committed: Sat Oct 26 23:53:38 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/storage/BlockManager.scala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/4261e834/core/src/main/scala/org/apache/spark/storage/BlockManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/storage/BlockManager.scala b/core/src/main/scala/org/apache/spark/storage/BlockManager.scala
index c02c032..dbe573d 100644
--- a/core/src/main/scala/org/apache/spark/storage/BlockManager.scala
+++ b/core/src/main/scala/org/apache/spark/storage/BlockManager.scala
@@ -523,8 +523,7 @@ private[spark] class BlockManager(
     val file = diskBlockManager.createBlockFile(blockId, filename, allowAppending =  true)
     val writer = new DiskBlockObjectWriter(blockId, file, serializer, bufferSize, compressStream)
     writer.registerCloseEventHandler(() => {
-      if (blockId.name != filename) {
-        // Avoid producing mappings if we're using unique filenames for blocks.
+      if (shuffleBlockManager.consolidateShuffleFiles) {
         diskBlockManager.mapBlockToFileSegment(blockId, writer.fileSegment())
       }
       val myInfo = new BlockInfo(StorageLevel.DISK_ONLY, false)


Mime
View raw message