[GitHub] spark pull request #20790: AccumulatorV2 subclass isZero scaladoc fix

2018-03-10 Thread HyukjinKwon
Github user HyukjinKwon commented on a diff in the pull request:

https://github.com/apache/spark/pull/20790#discussion_r173621260
  
--- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala ---
@@ -290,7 +290,8 @@ class LongAccumulator extends AccumulatorV2[jl.Long, 
jl.Long] {
   private var _count = 0L
 
   /**
-   * Adds v to the accumulator, i.e. increment sum by v and count by 1.
+   * Returns false if this accumulator has had any values added to it or 
the sum is non-zero.
+   *
--- End diff --

I think this duplicates the doc from `AccumulatorV2.isZero`. Can we simply 
remove this wrong doc and revert other changes so that we can reuse inherited 
doc from `AccumulatorV2.isZero` in all places?


---

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



[GitHub] spark pull request #20790: AccumulatorV2 subclass isZero scaladoc fix

2018-03-09 Thread smallory
GitHub user smallory opened a pull request:

https://github.com/apache/spark/pull/20790

AccumulatorV2 subclass isZero scaladoc fix

Added/corrected scaladoc for isZero on the DoubleAccumulator, 
CollectionAccumulator, and LongAccumulator subclasses of AccumulatorV2, 
particularly noting where there are requirements in addition to having a value 
of zero in order to return true.

## What changes were proposed in this pull request?

Three scaladoc comments are updated in AccumulatorV2.scala
No changes outside of comment blocks were made.

## How was this patch tested?

Running "sbt unidoc", fixing style errors found, and reviewing the 
resulting local scaladoc in firefox.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/smallory/spark patch-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/20790.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #20790


commit e165151676f412fc508e465b49ae058366da4c9d
Author: smallory 
Date:   2018-03-09T19:49:27Z

Updating isZero scaladoc

Added/corrected scaladoc for isZero on subclasses of AccumulatorV2, 
particularly noting where there are requirements in addition to having a value 
of zero in order to return true.

commit 6656be73b49b3fe1f4d26a44bee70ea7d2841e38
Author: smallory 
Date:   2018-03-09T22:09:34Z

Accumulator isZero scaladoc line length fix

Fixed line length style errors in Accumulator isZero scaladoc.




---

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