How do you use an accumulator?

1
Garfield Hackett asked a question: How do you use an accumulator?
Asked By: Garfield Hackett
Date created: Mon, Sep 13, 2021 11:05 PM
Date updated: Sat, Nov 26, 2022 12:51 AM

Content

Top best answers to the question «How do you use an accumulator»

An accumulator is created from an initial value v by calling SparkContext. accumulator(v). Tasks running on the cluster can then add to it using the add method or the += operator (in Scala and Python). However, they cannot read its value.

Your Answer