Skip to content

Commit

Permalink
[SPARK-17880][DOC] The url linking to AccumulatorV2 in the document…
Browse files Browse the repository at this point in the history
… is incorrect.

## What changes were proposed in this pull request?

In `programming-guide.md`, the url which links to `AccumulatorV2` says `api/scala/index.html#org.apache.spark.AccumulatorV2` but `api/scala/index.html#org.apache.spark.util.AccumulatorV2` is correct.

## How was this patch tested?
manual test.

Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>

Closes #15439 from sarutak/SPARK-17880.

(cherry picked from commit b512f04)
Signed-off-by: Reynold Xin <rxin@databricks.com>
  • Loading branch information
sarutak authored and rxin committed Oct 12, 2016
1 parent e68e95e commit f3d82b5
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 @@ -1372,7 +1372,7 @@ res2: Long = 10
{% endhighlight %}

While this code used the built-in support for accumulators of type Long, programmers can also
create their own types by subclassing [AccumulatorV2](api/scala/index.html#org.apache.spark.AccumulatorV2).
create their own types by subclassing [AccumulatorV2](api/scala/index.html#org.apache.spark.util.AccumulatorV2).
The AccumulatorV2 abstract class has several methods which need to override:
`reset` for resetting the accumulator to zero, and `add` for add anothor value into the accumulator, `merge` for merging another same-type accumulator into this one. Other methods need to override can refer to scala API document. For example, supposing we had a `MyVector` class
representing mathematical vectors, we could write:
Expand Down

0 comments on commit f3d82b5

Please sign in to comment.