diff options
Diffstat (limited to 'python/pyspark')
-rw-r--r-- | python/pyspark/context.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py index d8667e84fe..f63cc4a55f 100644 --- a/python/pyspark/context.py +++ b/python/pyspark/context.py @@ -248,14 +248,14 @@ class SparkContext(object): jrdd = readRDDFromFile(self._jsc, tempFile.name, numSlices) return RDD(jrdd, self, serializer) - def textFile(self, name, minSplits=None): + def textFile(self, name, minPartitions=None): """ Read a text file from HDFS, a local file system (available on all nodes), or any Hadoop-supported file system URI, and return it as an RDD of Strings. """ - minSplits = minSplits or min(self.defaultParallelism, 2) - return RDD(self._jsc.textFile(name, minSplits), self, + minPartitions = minPartitions or min(self.defaultParallelism, 2) + return RDD(self._jsc.textFile(name, minPartitions), self, UTF8Deserializer()) def wholeTextFiles(self, path): |