Github user aokolnychyi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16024#discussion_r89791975
  
    --- Diff: docs/programming-guide.md ---
    @@ -1378,29 +1378,36 @@ res2: Long = 10
     
     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.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:
    +The AccumulatorV2 abstract class has several methods which one has to 
override:
    +`reset` for resetting the accumulator to zero, `add` for adding another 
value into the accumulator,
    +and `merge` for merging another same-type accumulator into this one. Other 
methods that must be overridden
    +are contained in the [API 
documentation](api/scala/index.html#org.apache.spark.util.AccumulatorV2).
    +For example, supposing we had a `MathVector` class representing 
mathematical vectors, we could write:
    --- End diff --
    
    Your point makes sense to me. 
    
    The renaming was to done to improve the consistency between Java/Scala 
examples. For instance, the Scala example used MyVector, while the Java one - 
Vector. 
    
    Will it be a better idea to keep MyVector in the Scala example and reuse 
this name in Java?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to