1. [SPARK-23697][CORE] LegacyAccumulatorWrapper should define isZero (details)
Commit a42dd008c7770c48e62e6c1ad12f191c65c0cbd7 by wenchen
[SPARK-23697][CORE] LegacyAccumulatorWrapper should define isZero
## What changes were proposed in this pull request?
It's possible that Accumulators of Spark 1.x may no longer work with
Spark 2.x. This is because `LegacyAccumulatorWrapper.isZero` may return
wrong answer if `AccumulableParam` doesn't define equals/hashCode.
This PR fixes this by using reference equality check in
## How was this patch tested?
a new test
Author: Wenchen Fan <>
Closes #21229 from cloud-fan/accumulator.
(cherry picked from commit 4d5de4d303a773b1c18c350072344bd7efca9fc4)
Signed-off-by: Wenchen Fan <>
The file was modifiedcore/src/test/scala/org/apache/spark/util/AccumulatorV2Suite.scala (diff)
The file was modifiedcore/src/main/scala/org/apache/spark/util/AccumulatorV2.scala (diff)