Skip to content

Conversation

@j4munoz
Copy link
Contributor

@j4munoz j4munoz commented Jun 22, 2016

What changes were proposed in this pull request?

There is an error when I execute this code because "trueWeights" array has length "features + 1", whereas "x" array has length "features".

How was this patch tested?

Manual tests

java.lang.ArrayIndexOutOfBoundsException: 2
at org.netlib.blas.Ddot.ddot(blas.f)
at com.github.fommil.netlib.F2jBLAS.ddot(F2jBLAS.java:71)
at org.apache.spark.mllib.util.SVMDataGenerator$$anonfun$3.apply(SVMDataGenerator.scala:66)
at org.apache.spark.mllib.util.SVMDataGenerator$$anonfun$3.apply(SVMDataGenerator.scala:60)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply$mcV$sp(PairRDDFunctions.scala:1198)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply(PairRDDFunctions.scala:1197)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply(PairRDDFunctions.scala:1197)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1250)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13.apply(PairRDDFunctions.scala:1205)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13.apply(PairRDDFunctions.scala:1185)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:89)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

java.lang.ArrayIndexOutOfBoundsException: 2
	at org.netlib.blas.Ddot.ddot(blas.f)
	at com.github.fommil.netlib.F2jBLAS.ddot(F2jBLAS.java:71)
	at org.apache.spark.mllib.util.SVMDataGenerator$$anonfun$3.apply(SVMDataGenerator.scala:66)
	at org.apache.spark.mllib.util.SVMDataGenerator$$anonfun$3.apply(SVMDataGenerator.scala:60)
	at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
	at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
	at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply$mcV$sp(PairRDDFunctions.scala:1198)
	at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply(PairRDDFunctions.scala:1197)
	at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply(PairRDDFunctions.scala:1197)
	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1250)
	at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13.apply(PairRDDFunctions.scala:1205)
	at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13.apply(PairRDDFunctions.scala:1185)
	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
	at org.apache.spark.scheduler.Task.run(Task.scala:89)
	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
@j4munoz j4munoz changed the title ArrayIndexOutOfBoundsException fixed [SPARK-13849][MLLIB] ArrayIndexOutOfBoundsException fixed Jun 22, 2016
@j4munoz j4munoz changed the title [SPARK-13849][MLLIB] ArrayIndexOutOfBoundsException fixed [SPARK-16137][MLLIB] ArrayIndexOutOfBoundsException fixed Jun 22, 2016
@srowen
Copy link
Member

srowen commented Jun 22, 2016

Looks OK, but this has been connected to two wrong JIRAs.

@j4munoz
Copy link
Contributor Author

j4munoz commented Jun 22, 2016

I have no idea what a "JIRA" is, this is my first commit I apologize. Could you help me please?

@srowen
Copy link
Member

srowen commented Jun 22, 2016

https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark
https://issues.apache.org/jira/browse/SPARK

But really, this is so minor that it probably doesn't need it.

@j4munoz j4munoz changed the title [SPARK-16137][MLLIB] ArrayIndexOutOfBoundsException fixed [SPARK][MLlib] ArrayIndexOutOfBoundsException fixed Jun 22, 2016
@srowen
Copy link
Member

srowen commented Jun 22, 2016

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Jun 22, 2016

Test build #61043 has finished for PR 13849 at commit 0e2f73b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Jun 24, 2016

@j4munoz I can merge this but you opened it vs branch-1.6; please open vs master and give a more descriptive title.

@j4munoz
Copy link
Contributor Author

j4munoz commented Jun 24, 2016

Alright srowen, the new pull request is #13895.
Thank you very much for your patience and support. I will proceed closing this pull request.

@j4munoz j4munoz closed this Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants