Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/1978#discussion_r16689375
--- Diff: python/pyspark/shuffle.py ---
@@ -434,6 +437,63 @@ def _recursive_merged_items(self, start):
os.remove(os.path.join(path, str(i)))
+class ExternalSorter(object):
+ """
+ ExtenalSorter will divide the elements into chunks, sort them in
+ memory and dump them into disks, finally merge them back.
+
+ The spilling will only happen when the used memory goes above
+ the limit.
+ """
+ def __init__(self, memory_limit, serializer=None):
+ self.memory_limit = memory_limit
+ self.local_dirs = _get_local_dirs("sort")
+ self.serializer = serializer or
BatchedSerializer(PickleSerializer(), 1024)
+
+ def _get_path(self, n):
--- End diff --
Yeah good question. We don't have that yet, but in the future we'll have
support for multiple local storage levels.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]