(BCC dev@)

The example is out of date with respect to current Vector class. The
zeros() method is on "Vectors". There is not currently a += operation
for Vector anymore.

To be fair the example doesn't claim this illustrates use of the Spark
Vector class but it did work with the now-deprecated Vector.

Make sure you still have AccumulableParam imported.

You could make a PR to adjust the example to something that works with
the newer class once you have it working.

On Mon, Jun 9, 2014 at 12:27 PM, dataginjaninja
<rickett.stepha...@gmail.com> wrote:
> New error :-(
>
> scala> object VectorAccumulatorParam extends AccumulatorParam[Vector] {
>      |   def zero(initialValue: Vector): Vector = {
>      |     Vector.zeros(initialValue.size)
>      |   }
>      |   def addInPlace(v1: Vector, v2: Vector): Vector = {
>      |     v1 += v2
>      |   }
>      | }
> <console>:14: error: value zeros is not a member of object
> scala.collection.immutable.Vector
>            Vector.zeros(initialValue.size)
>                   ^
> <console>:17: error: value += is not a member of
> org.apache.spark.mllib.linalg.Vector
>            v1 += v2
>
>
>
> -----
> Cheers,
>
> Stephanie
> --
> View this message in context: 
> http://apache-spark-developers-list.1001551.n3.nabble.com/implementing-the-VectorAccumulatorParam-tp6973p6978.html
> Sent from the Apache Spark Developers List mailing list archive at Nabble.com.

Reply via email to