Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-23642][DOCS] AccumulatorV2 subclass isZero scaladoc fix #20790

Closed
wants to merge 2 commits into from

Conversation

smallory
Copy link

@smallory smallory commented Mar 9, 2018

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.

smallory added 2 commits March 9, 2018 12:49
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.
Fixed line length style errors in Accumulator isZero scaladoc.
@@ -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.
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@HyukjinKwon
Copy link
Member

Shall we fix the title to [MINOR][DOCS] AccumulatorV2 ... to be consistent with other PRs?

@HyukjinKwon
Copy link
Member

Wait .. I just found you opened a JIRA - SPARK-23642. Please link it by [SPARK-23642][DOCS] .... see https://spark.apache.org/contributing.html

@smallory smallory changed the title AccumulatorV2 subclass isZero scaladoc fix [SPARK-23642][DOCS] AccumulatorV2 subclass isZero scaladoc fix Mar 13, 2018
@smallory
Copy link
Author

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.

Copy link
Contributor

@jiangxb1987 jiangxb1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HyukjinKwon
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Mar 14, 2018

Test build #88220 has finished for PR 20790 at commit 6656be7.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Mar 14, 2018

Test build #88227 has finished for PR 20790 at commit 6656be7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

Merged to master and branch-2.3.

asfgit pushed a commit that referenced this pull request Mar 15, 2018
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.

Author: smallory <s.mallory@gmail.com>

Closes #20790 from smallory/patch-1.

(cherry picked from commit 4f5bad6)
Signed-off-by: hyukjinkwon <gurwls223@gmail.com>
@asfgit asfgit closed this in 4f5bad6 Mar 15, 2018
@smallory smallory deleted the patch-1 branch March 15, 2018 03:18
@smallory smallory restored the patch-1 branch March 15, 2018 03:29
mstewart141 pushed a commit to mstewart141/spark that referenced this pull request Mar 24, 2018
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.

Author: smallory <s.mallory@gmail.com>

Closes apache#20790 from smallory/patch-1.
peter-toth pushed a commit to peter-toth/spark that referenced this pull request Oct 6, 2018
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.

Author: smallory <s.mallory@gmail.com>

Closes apache#20790 from smallory/patch-1.

(cherry picked from commit 4f5bad6)
Signed-off-by: hyukjinkwon <gurwls223@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants