aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/context.py
diff options
context:
space:
mode:
authorCodingCat <zhunansjtu@gmail.com>2014-04-18 10:01:16 -0700
committerReynold Xin <rxin@apache.org>2014-04-18 10:01:16 -0700
commite31c8ffca65e0e5cd5f1a6229f3d654a24b7b18c (patch)
treeb0923d192066b8f44bad5047f0ca03719af5c789 /python/pyspark/context.py
parent7863ecca35be9af1eca0dfe5fd8806c5dd710fd6 (diff)
downloadspark-e31c8ffca65e0e5cd5f1a6229f3d654a24b7b18c.tar.gz
spark-e31c8ffca65e0e5cd5f1a6229f3d654a24b7b18c.tar.bz2
spark-e31c8ffca65e0e5cd5f1a6229f3d654a24b7b18c.zip
SPARK-1483: Rename minSplits to minPartitions in public APIs
https://issues.apache.org/jira/browse/SPARK-1483 From the original JIRA: " The parameter name is part of the public API in Scala and Python, since you can pass named parameters to a method, so we should name it to this more descriptive term. Everywhere else we refer to "splits" as partitions." - @mateiz Author: CodingCat <zhunansjtu@gmail.com> Closes #430 from CodingCat/SPARK-1483 and squashes the following commits: 4b60541 [CodingCat] deprecate defaultMinSplits ba2c663 [CodingCat] Rename minSplits to minPartitions in public APIs
Diffstat (limited to 'python/pyspark/context.py')
-rw-r--r--python/pyspark/context.py6
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):