How to add an accumulator for a Set in Spark

classic Classic list List threaded Threaded
2 messages Options
SRK
Reply | Threaded
Open this post in threaded view
|

How to add an accumulator for a Set in Spark

SRK
This post has NOT been accepted by the mailing list yet.
Hi,

How do I add an accumulator for a Set in Spark?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: How to add an accumulator for a Set in Spark

pppsunil
This post has NOT been accepted by the mailing list yet.
Have you looked at using Accumulable interface,  Take a look at Spark documentation at http://spark.apache.org/docs/latest/programming-guide.html#accumulators it gives example of how to use vector type for accumalator, which might be very close to what you need