Github user holdenk commented on a diff in the pull request: https://github.com/apache/spark/pull/11105#discussion_r86490194 --- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala --- @@ -136,15 +181,92 @@ abstract class AccumulatorV2[IN, OUT] extends Serializable { def reset(): Unit /** + * Takes the inputs and accumulates. e.g. it can be a simple `+=` for counter accumulator. + * Developers should extend addImpl to customize the adding functionality. + */ + final def add(v: IN): Unit = { --- End diff -- Yah there isn't a way to do this for everyone without breaking binary compatibility. Given that the AccumulatorV2 API was added in Spark2.0 though my only argument is that I don't expect anyone would be using this yet (given the current usability of accumulators) and maybe it would be ok if we mention it in the release notes? But if you think the best path forward is subclassing that makes sense too.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org