O'Reilly logo
  • Sam Zeitlin thinks this is interesting:

While future versions of Spark may change this behavior to count the update only once, the current version (1.2.0) does have the multiple update behavior, so accumulators in transformations are recommended only for debugging purposes.

From

Cover of Learning Spark

Note

would be good to know if this has changed (we're now up to version 2.2)