aboutsummaryrefslogtreecommitdiff
path: root/docs/programming-guide.md
diff options
context:
space:
mode:
authorKeiji Yoshida <yoshida.keiji.84@gmail.com>2015-08-22 02:38:10 -0700
committerReynold Xin <rxin@databricks.com>2015-08-22 02:38:10 -0700
commit46fcb9e0dbb2b28110f68a3d9f6c0c47bfd197b1 (patch)
tree9839bdc4f25ff32fd23006065a076c7df8e4ad7e /docs/programming-guide.md
parent630a994e6a9785d1704f8e7fb604f32f5dea24f8 (diff)
downloadspark-46fcb9e0dbb2b28110f68a3d9f6c0c47bfd197b1.tar.gz
spark-46fcb9e0dbb2b28110f68a3d9f6c0c47bfd197b1.tar.bz2
spark-46fcb9e0dbb2b28110f68a3d9f6c0c47bfd197b1.zip
Update programming-guide.md
Update `lineLengths.persist();` to `lineLengths.persist(StorageLevel.MEMORY_ONLY());` because `JavaRDD#persist` needs a parameter of `StorageLevel`. Author: Keiji Yoshida <yoshida.keiji.84@gmail.com> Closes #8372 from yosssi/patch-1.
Diffstat (limited to 'docs/programming-guide.md')
-rw-r--r--docs/programming-guide.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/programming-guide.md b/docs/programming-guide.md
index 982c5eabe6..4cf83bb392 100644
--- a/docs/programming-guide.md
+++ b/docs/programming-guide.md
@@ -549,7 +549,7 @@ returning only its answer to the driver program.
If we also wanted to use `lineLengths` again later, we could add:
{% highlight java %}
-lineLengths.persist();
+lineLengths.persist(StorageLevel.MEMORY_ONLY());
{% endhighlight %}
before the `reduce`, which would cause `lineLengths` to be saved in memory after the first time it is computed.