It seems that if you have an AccumulatorParam (or AccumulableParam) where "R" is not a primitive, it will need to implement equlas() if the implementation of the zero() creates a new instance (which I guess it will in those cases). This is where isZero applies the comparison: https://github.com/apache/spark/blob/254bc8c34e70241508bdfc8ff42a65491f5280cd/core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala#L462 I overcame this by providing null in zero and instantiating in addAccumulator() but that's more of a hack, on the other hand, I don't see a trivial solution, which is one of the reasons I'm writing this. Anyone encounter this when upgrading to 2.0 ? with non-trivial Accumulators of course..
Thanks, Amit