Repository: spark Updated Branches: refs/heads/branch-1.1 a12d3ae32 -> 721f2fdc9
[SPARK-3035] Wrong example with SparkContext.addFile https://issues.apache.org/jira/browse/SPARK-3035 fix for wrong document. Author: iAmGhost <kdh7...@gmail.com> Closes #1942 from iAmGhost/master and squashes the following commits: 487528a [iAmGhost] [SPARK-3035] Wrong example with SparkContext.addFile fix for wrong document. (cherry picked from commit 379e7585c356f20bf8b4878ecba9401e2195da12) Signed-off-by: Josh Rosen <joshro...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/721f2fdc Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/721f2fdc Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/721f2fdc Branch: refs/heads/branch-1.1 Commit: 721f2fdc95032132af3d4a00dbc8399d356f8faf Parents: a12d3ae Author: iAmGhost <kdh7...@gmail.com> Authored: Sat Aug 16 16:48:38 2014 -0700 Committer: Josh Rosen <joshro...@apache.org> Committed: Sat Aug 16 16:48:52 2014 -0700 ---------------------------------------------------------------------- python/pyspark/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/721f2fdc/python/pyspark/context.py ---------------------------------------------------------------------- diff --git a/python/pyspark/context.py b/python/pyspark/context.py index 4001eca..6c04923 100644 --- a/python/pyspark/context.py +++ b/python/pyspark/context.py @@ -613,7 +613,7 @@ class SparkContext(object): >>> def func(iterator): ... with open(SparkFiles.get("test.txt")) as testFile: ... fileVal = int(testFile.readline()) - ... return [x * 100 for x in iterator] + ... return [x * fileVal for x in iterator] >>> sc.parallelize([1, 2, 3, 4]).mapPartitions(func).collect() [100, 200, 300, 400] """ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org