Accumulators collect distributed statistics or aggregates in a from user functions
and operators. Each parallel instance creates and updates its own accumulator object,
and the different parallel instances of the accumulator are later merged.
merged by the system at the end of the job. The result can be obtained from the
result of a job execution, or from the web runtime monitor.
The accumulators are inspired by the Hadoop/MapReduce counters.
The type added to the accumulator might differ from the type returned. This
is the case e.g. for a set-accumulator: We add single objects, but the result
is a set of objects.