diff options
author | Aaron Davidson <aaron@databricks.com> | 2013-10-26 23:53:38 -0700 |
---|---|---|
committer | Aaron Davidson <aaron@databricks.com> | 2013-10-26 23:53:38 -0700 |
commit | 4261e834cb9c446366569a8dd49d3ba7c1e72ffc (patch) | |
tree | ef1def2d37076f69fe71ca81a2a8eb65f9276494 | |
parent | 596f18479e5cb14fdc0af800f97b7b13e963fe5b (diff) | |
download | spark-4261e834cb9c446366569a8dd49d3ba7c1e72ffc.tar.gz spark-4261e834cb9c446366569a8dd49d3ba7c1e72ffc.tar.bz2 spark-4261e834cb9c446366569a8dd49d3ba7c1e72ffc.zip |
Use flag instead of name check.
-rw-r--r-- | core/src/main/scala/org/apache/spark/storage/BlockManager.scala | 3 |
1 files changed, 1 insertions, 2 deletions
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 c02c0327ac..dbe573dc64 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) |