Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/1338#discussion_r15387719
--- Diff: python/pyspark/rdd.py ---
@@ -964,6 +964,106 @@ def first(self):
"""
return self.take(1)[0]
+ def saveAsNewAPIHadoopDataset(self, conf, keyConverter=None,
valueConverter=None):
+ """
+ Output a Python RDD of key-value pairs (of form C{RDD[(K, V)]}) to
any Hadoop file
+ system, using the new Hadoop OutputFormat API (mapreduce package).
Keys/values are
+ converted for output using either user specified converters or, by
default,
+ L{org.apache.spark.api.python.JavaToWritableConverter}.
+
+ @param conf: Hadoop job configuration, passed in as a dict
+ @param keyConverter: (None by default)
+ @param valueConverter: (None by default)
+ """
+ jconf = self.ctx._dictToJavaMap(conf)
+ reserialized =
self._reserialize(BatchedSerializer(PickleSerializer(), 10))
--- End diff --
Since this 10 appears in a lot of places, maybe factor it out into a
constant?
---
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.
---