Skip to content

Commit

Permalink
Update programming-guide.md
Browse files Browse the repository at this point in the history
Update `lineLengths.persist();` to `lineLengths.persist(StorageLevel.MEMORY_ONLY());` because `JavaRDD#persist` needs a parameter of `StorageLevel`.

Author: Keiji Yoshida <[email protected]>

Closes apache#8372 from yosssi/patch-1.
  • Loading branch information
yosssi authored and rxin committed Aug 22, 2015
1 parent 630a994 commit 46fcb9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/programming-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 46fcb9e

Please sign in to comment.