[ 
https://issues.apache.org/jira/browse/SPARK-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joseph K. Bradley updated SPARK-1215:
-------------------------------------

    Comment: was deleted

(was: Just to let you know, I'll give the go-ahead for this tomorrow.  Based on
Patrick's recommendation, I'm blocking on this JIRA until tomorrow to give
Prashant  ( https://issues.apache.org/jira/browse/SPARK-2497 ) a chance to
fix a MIMA issue.  If it's not fixed by tomorrow, then I'll get Manish to
do a temp filter workaround.


On Tue, Jul 15, 2014 at 9:45 PM, Xiangrui Meng (JIRA) <j...@apache.org>

)

> Clustering: Index out of bounds error
> -------------------------------------
>
>                 Key: SPARK-1215
>                 URL: https://issues.apache.org/jira/browse/SPARK-1215
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>            Reporter: dewshick
>            Assignee: Joseph K. Bradley
>         Attachments: test.csv
>
>
> code:
> import org.apache.spark.mllib.clustering._
> val test = sc.makeRDD(Array(4,4,4,4,4).map(e => Array(e.toDouble)))
> val kmeans = new KMeans().setK(4)
> kmeans.run(test) evals with java.lang.ArrayIndexOutOfBoundsException
> error:
> 14/01/17 12:35:54 INFO scheduler.DAGScheduler: Stage 25 (collectAsMap at 
> KMeans.scala:243) finished in 0.047 s
> 14/01/17 12:35:54 INFO spark.SparkContext: Job finished: collectAsMap at 
> KMeans.scala:243, took 16.389537116 s
> Exception in thread "main" java.lang.reflect.InvocationTargetException
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at com.simontuffs.onejar.Boot.run(Boot.java:340)
>       at com.simontuffs.onejar.Boot.main(Boot.java:166)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
>       at 
> org.apache.spark.mllib.clustering.LocalKMeans$.kMeansPlusPlus(LocalKMeans.scala:47)
>       at 
> org.apache.spark.mllib.clustering.KMeans$$anonfun$19.apply(KMeans.scala:247)
>       at 
> org.apache.spark.mllib.clustering.KMeans$$anonfun$19.apply(KMeans.scala:244)
>       at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
>       at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
>       at scala.collection.immutable.Range.foreach(Range.scala:81)
>       at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
>       at scala.collection.immutable.Range.map(Range.scala:46)
>       at 
> org.apache.spark.mllib.clustering.KMeans.initKMeansParallel(KMeans.scala:244)
>       at org.apache.spark.mllib.clustering.KMeans.run(KMeans.scala:124)
>       at Clustering$$anonfun$1.apply$mcDI$sp(Clustering.scala:21)
>       at Clustering$$anonfun$1.apply(Clustering.scala:19)
>       at Clustering$$anonfun$1.apply(Clustering.scala:19)
>       at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
>       at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
>       at scala.collection.immutable.Range.foreach(Range.scala:78)
>       at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
>       at scala.collection.immutable.Range.map(Range.scala:46)
>       at Clustering$.main(Clustering.scala:19)
>       at Clustering.main(Clustering.scala)
>       ... 6 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to