spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swetha kasireddy <>
Subject Re: How to add an accumulator for a Set in Spark
Date Wed, 16 Mar 2016 17:24:39 GMT
OK. I did take a look at them. So once I have an accumulater for a HashSet,
how can I check if a particular key is already present in the HashSet
accumulator? I don't see any .contains method there. My requirement is that
I need to keep accumulating the keys in the HashSet across all the tasks in
various nodes and use it to do a check if the key is already present in the

On Tue, Mar 15, 2016 at 9:56 PM, pppsunil <> wrote:

> Have you looked at using Accumulable interface,  Take a look at Spark
> documentation at
> it
> gives example of how to use vector type for accumalator, which might be
> very
> close to what you need
> --
> View this message in context:
> Sent from the Apache Spark User List mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message