spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <so...@cloudera.com>
Subject Re: Typo in the programming guide?
Date Sun, 27 Nov 2016 17:57:49 GMT
Yes, feel free to open a [MINOR] PR to fix that.

On Sun, Nov 27, 2016 at 5:34 PM Anton Okolnychyi <okolnychyyanton@gmail.com>
wrote:

> Hi guys,
>
> I am looking at the Accumulator section in the latest programming guide.
> Is there a typo in the sample code? Shouldn't the add() method accept only
> one param in Spark 2.0? It looks like the signature is inherited
> from AccumulatorParam, which was there before.
>
> object VectorAccumulatorV2 extends AccumulatorV2[MyVector, MyVector] {
>   val vec_ : MyVector = MyVector.createZeroVector
>   def reset(): MyVector = {
>     vec_.reset()
>   }
>   def add(v1: MyVector, v2: MyVector): MyVector = {
>     vec_.add(v2)
>   }
>   ...}
>
>
> Sincerely,
> Anton
>

Mime
View raw message