[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



[GitHub] spark issue #20790: [SPARK-23642][DOCS] AccumulatorV2 subclass isZero scalad...

2018-03-13 Thread smallory
Github user smallory commented on the issue:

https://github.com/apache/spark/pull/20790
  
Thanks for the pointer on the title convention, the way the contributing 
doc distinguished code and documentation changes left me a bit puzzled as to 
what actually applied to this change.


---

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



[GitHub] spark pull request #20790: [SPARK-23642][DOCS] AccumulatorV2 subclass isZero...

2018-03-13 Thread smallory
Github user smallory commented on a diff in the pull request:

https://github.com/apache/spark/pull/20790#discussion_r174225748
  
--- 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 --

The current documentation for AccumulatorV2.isZero would be misleading for 
the behaviour shown when values have been added to the accumulator, but the sum 
is zero. This still would return false, even though it is a non-count 
accumulator. I don't believe that any of the implementations in this file 
actually behave exactly as described by AccumulatorV2.isZero.


---

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