Skip to content

Commit

Permalink
[SPARK-2013] Documentation for saveAsPickleFile and pickleFile in Python
Browse files Browse the repository at this point in the history
Author: Kan Zhang <[email protected]>

Closes #983 from kanzhang/SPARK-2013 and squashes the following commits:

0e128bb [Kan Zhang] [SPARK-2013] minor update
e728516 [Kan Zhang] [SPARK-2013] Documentation for saveAsPickleFile and pickleFile in Python

(cherry picked from commit b52603b)
Signed-off-by: Reynold Xin <[email protected]>

Conflicts:
	docs/programming-guide.md
  • Loading branch information
kanzhang authored and rxin committed Jun 14, 2014
1 parent b1a7e99 commit 05d85c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/programming-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,12 @@ Some notes on reading files with Spark:
* The `textFile` method also takes an optional second argument for controlling the number of slices of the file. By default, Spark creates one slice for each block of the file (blocks being 64MB by default in HDFS), but you can also ask for a higher number of slices by passing a larger value. Note that you cannot have fewer slices than blocks.

Apart reading files as a collection of lines,
`SparkContext.wholeTextFiles` lets you read a directory containing multiple small text files, and returns each of them as (filename, content) pairs. This is in contrast with `textFile`, which would return one record per line in each file.

</div>
* `SparkContext.wholeTextFiles` lets you read a directory containing multiple small text files, and returns each of them as (filename, content) pairs. This is in contrast with `textFile`, which would return one record per line in each file.

* `RDD.saveAsPickleFile` and `SparkContext.pickleFile` support saving an RDD in a simple format consisting of pickled Python objects. Batching is used on pickle serialization, with default batch size 10.

</div>

</div>

Expand Down

0 comments on commit 05d85c8

Please sign in to comment.