Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
davies committed Sep 15, 2014
1 parent 8ef965e commit 4d4bc86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,11 @@ def sorted(self, iterator, key=None, reverse=False):
with open(path, 'w') as f:
self.serializer.dump_stream(current_chunk, f)
chunks.append(self.serializer.load_stream(open(path)))
os.unlink(path) # data will be deleted after close
current_chunk = []
gc.collect()
MemoryBytesSpilled += (used_memory - get_used_memory()) << 20
DiskBytesSpilled += os.path.getsize(path)
os.unlink(path) # data will be deleted after close

elif not chunks:
batch = min(batch * 2, 10000)
Expand Down

0 comments on commit 4d4bc86

Please sign in to comment.