aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/context.py
diff options
context:
space:
mode:
authorDavies Liu <davies.liu@gmail.com>2014-10-07 18:09:27 -0700
committerJosh Rosen <joshrosen@apache.org>2014-10-07 18:09:27 -0700
commit798ed22c289cf65f2249bf2f4250285685ca69e7 (patch)
tree137d93c32454aaf39e6416823a8604f816f73926 /python/pyspark/context.py
parentb69c9fb6fb048509bbd8430fb697dc3a5ca4fe59 (diff)
downloadspark-798ed22c289cf65f2249bf2f4250285685ca69e7.tar.gz
spark-798ed22c289cf65f2249bf2f4250285685ca69e7.tar.bz2
spark-798ed22c289cf65f2249bf2f4250285685ca69e7.zip
[SPARK-3412] [PySpark] Replace Epydoc with Sphinx to generate Python API docs
Retire Epydoc, use Sphinx to generate API docs. Refine Sphinx docs, also convert some docstrings into Sphinx style. It looks like: ![api doc](https://cloud.githubusercontent.com/assets/40902/4538272/9e2d4f10-4dec-11e4-8d96-6e45a8fe51f9.png) Author: Davies Liu <davies.liu@gmail.com> Closes #2689 from davies/docs and squashes the following commits: bf4a0a5 [Davies Liu] fix links 3fb1572 [Davies Liu] fix _static in jekyll 65a287e [Davies Liu] fix scripts and logo 8524042 [Davies Liu] Merge branch 'master' of github.com:apache/spark into docs d5b874a [Davies Liu] Merge branch 'master' of github.com:apache/spark into docs 4bc1c3c [Davies Liu] refactor 746d0b6 [Davies Liu] @param -> :param 240b393 [Davies Liu] replace epydoc with sphinx doc
Diffstat (limited to 'python/pyspark/context.py')
-rw-r--r--python/pyspark/context.py92
1 files changed, 46 insertions, 46 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py
index a45d79d642..6fb30d65c5 100644
--- a/python/pyspark/context.py
+++ b/python/pyspark/context.py
@@ -73,21 +73,21 @@ class SparkContext(object):
Create a new SparkContext. At least the master and app name should be set,
either through the named parameters here or through C{conf}.
- @param master: Cluster URL to connect to
+ :param master: Cluster URL to connect to
(e.g. mesos://host:port, spark://host:port, local[4]).
- @param appName: A name for your job, to display on the cluster web UI.
- @param sparkHome: Location where Spark is installed on cluster nodes.
- @param pyFiles: Collection of .zip or .py files to send to the cluster
+ :param appName: A name for your job, to display on the cluster web UI.
+ :param sparkHome: Location where Spark is installed on cluster nodes.
+ :param pyFiles: Collection of .zip or .py files to send to the cluster
and add to PYTHONPATH. These can be paths on the local file
system or HDFS, HTTP, HTTPS, or FTP URLs.
- @param environment: A dictionary of environment variables to set on
+ :param environment: A dictionary of environment variables to set on
worker nodes.
- @param batchSize: The number of Python objects represented as a single
+ :param batchSize: The number of Python objects represented as a single
Java object. Set 1 to disable batching or -1 to use an
unlimited batch size.
- @param serializer: The serializer for RDDs.
- @param conf: A L{SparkConf} object setting Spark properties.
- @param gateway: Use an existing gateway and JVM, otherwise a new JVM
+ :param serializer: The serializer for RDDs.
+ :param conf: A L{SparkConf} object setting Spark properties.
+ :param gateway: Use an existing gateway and JVM, otherwise a new JVM
will be instantiated.
@@ -417,16 +417,16 @@ class SparkContext(object):
3. If this fails, the fallback is to call 'toString' on each key and value
4. C{PickleSerializer} is used to deserialize pickled objects on the Python side
- @param path: path to sequncefile
- @param keyClass: fully qualified classname of key Writable class
+ :param path: path to sequncefile
+ :param keyClass: fully qualified classname of key Writable class
(e.g. "org.apache.hadoop.io.Text")
- @param valueClass: fully qualified classname of value Writable class
+ :param valueClass: fully qualified classname of value Writable class
(e.g. "org.apache.hadoop.io.LongWritable")
- @param keyConverter:
- @param valueConverter:
- @param minSplits: minimum splits in dataset
+ :param keyConverter:
+ :param valueConverter:
+ :param minSplits: minimum splits in dataset
(default min(2, sc.defaultParallelism))
- @param batchSize: The number of Python objects represented as a single
+ :param batchSize: The number of Python objects represented as a single
Java object. (default sc._default_batch_size_for_serialized_input)
"""
minSplits = minSplits or min(self.defaultParallelism, 2)
@@ -446,18 +446,18 @@ class SparkContext(object):
A Hadoop configuration can be passed in as a Python dict. This will be converted into a
Configuration in Java
- @param path: path to Hadoop file
- @param inputFormatClass: fully qualified classname of Hadoop InputFormat
+ :param path: path to Hadoop file
+ :param inputFormatClass: fully qualified classname of Hadoop InputFormat
(e.g. "org.apache.hadoop.mapreduce.lib.input.TextInputFormat")
- @param keyClass: fully qualified classname of key Writable class
+ :param keyClass: fully qualified classname of key Writable class
(e.g. "org.apache.hadoop.io.Text")
- @param valueClass: fully qualified classname of value Writable class
+ :param valueClass: fully qualified classname of value Writable class
(e.g. "org.apache.hadoop.io.LongWritable")
- @param keyConverter: (None by default)
- @param valueConverter: (None by default)
- @param conf: Hadoop configuration, passed in as a dict
+ :param keyConverter: (None by default)
+ :param valueConverter: (None by default)
+ :param conf: Hadoop configuration, passed in as a dict
(None by default)
- @param batchSize: The number of Python objects represented as a single
+ :param batchSize: The number of Python objects represented as a single
Java object. (default sc._default_batch_size_for_serialized_input)
"""
jconf = self._dictToJavaMap(conf)
@@ -476,17 +476,17 @@ class SparkContext(object):
This will be converted into a Configuration in Java.
The mechanism is the same as for sc.sequenceFile.
- @param inputFormatClass: fully qualified classname of Hadoop InputFormat
+ :param inputFormatClass: fully qualified classname of Hadoop InputFormat
(e.g. "org.apache.hadoop.mapreduce.lib.input.TextInputFormat")
- @param keyClass: fully qualified classname of key Writable class
+ :param keyClass: fully qualified classname of key Writable class
(e.g. "org.apache.hadoop.io.Text")
- @param valueClass: fully qualified classname of value Writable class
+ :param valueClass: fully qualified classname of value Writable class
(e.g. "org.apache.hadoop.io.LongWritable")
- @param keyConverter: (None by default)
- @param valueConverter: (None by default)
- @param conf: Hadoop configuration, passed in as a dict
+ :param keyConverter: (None by default)
+ :param valueConverter: (None by default)
+ :param conf: Hadoop configuration, passed in as a dict
(None by default)
- @param batchSize: The number of Python objects represented as a single
+ :param batchSize: The number of Python objects represented as a single
Java object. (default sc._default_batch_size_for_serialized_input)
"""
jconf = self._dictToJavaMap(conf)
@@ -507,18 +507,18 @@ class SparkContext(object):
A Hadoop configuration can be passed in as a Python dict. This will be converted into a
Configuration in Java.
- @param path: path to Hadoop file
- @param inputFormatClass: fully qualified classname of Hadoop InputFormat
+ :param path: path to Hadoop file
+ :param inputFormatClass: fully qualified classname of Hadoop InputFormat
(e.g. "org.apache.hadoop.mapred.TextInputFormat")
- @param keyClass: fully qualified classname of key Writable class
+ :param keyClass: fully qualified classname of key Writable class
(e.g. "org.apache.hadoop.io.Text")
- @param valueClass: fully qualified classname of value Writable class
+ :param valueClass: fully qualified classname of value Writable class
(e.g. "org.apache.hadoop.io.LongWritable")
- @param keyConverter: (None by default)
- @param valueConverter: (None by default)
- @param conf: Hadoop configuration, passed in as a dict
+ :param keyConverter: (None by default)
+ :param valueConverter: (None by default)
+ :param conf: Hadoop configuration, passed in as a dict
(None by default)
- @param batchSize: The number of Python objects represented as a single
+ :param batchSize: The number of Python objects represented as a single
Java object. (default sc._default_batch_size_for_serialized_input)
"""
jconf = self._dictToJavaMap(conf)
@@ -537,17 +537,17 @@ class SparkContext(object):
This will be converted into a Configuration in Java.
The mechanism is the same as for sc.sequenceFile.
- @param inputFormatClass: fully qualified classname of Hadoop InputFormat
+ :param inputFormatClass: fully qualified classname of Hadoop InputFormat
(e.g. "org.apache.hadoop.mapred.TextInputFormat")
- @param keyClass: fully qualified classname of key Writable class
+ :param keyClass: fully qualified classname of key Writable class
(e.g. "org.apache.hadoop.io.Text")
- @param valueClass: fully qualified classname of value Writable class
+ :param valueClass: fully qualified classname of value Writable class
(e.g. "org.apache.hadoop.io.LongWritable")
- @param keyConverter: (None by default)
- @param valueConverter: (None by default)
- @param conf: Hadoop configuration, passed in as a dict
+ :param keyConverter: (None by default)
+ :param valueConverter: (None by default)
+ :param conf: Hadoop configuration, passed in as a dict
(None by default)
- @param batchSize: The number of Python objects represented as a single
+ :param batchSize: The number of Python objects represented as a single
Java object. (default sc._default_batch_size_for_serialized_input)
"""
jconf = self._dictToJavaMap(conf)