sryza / spark-ts-examples

Spark TS Examples
Apache License 2.0
120 stars 79 forks source link

JavaStocks class won't give the right result #5

Open jdu-zingbox opened 8 years ago

jdu-zingbox commented 8 years ago

spark-submit --class com.cloudera.tsexamples.JavaStocks target/spark-ts-examples-0.0.1-SNAPSHOT-jar-with-dependencies.jar

The output min and max gives: (AAL,NaN) (AAL,NaN)

The issue may be related to the call of timeSeriesRDDFromObservations. In the mean time, the Scala version and Stocks.java prints the correct result.

spicoflorin commented 8 years ago

Hi! I have the same issue with JavaStocks. By Saving the tickerTsrdd I've seen that only one day(09/09/2015) was filled in for all the symbols while for the other days was NaN.

dmpvost commented 8 years ago

Hi! I have the same problem. I'm trying to use it since 3/4days, but it don't work. I'm trying with data from spark-SQL, but I'm block after timeSeriesRDDFromObservations.

Umair044 commented 8 years ago

hi @sryza Error occured: Caused by: java.lang.NumberFormatException: For input string: "2015 "

Umair044 commented 8 years ago

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 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) Caused by: java.lang.NumberFormatException: For input string: "2015 " at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.parseInt(Integer.java:615) at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:229) at scala.collection.immutable.StringOps.toInt(StringOps.scala:31) at $iwC$$iwC$$iwC$$iwC$$iwC$$$$4feb7c724086d5df54804fec562ad72$$$$iwC$$iwC$$iwC$$iwC$$iwC$Stocks$$anonfun$1.apply(:458) at $iwC$$iwC$$iwC$$iwC$$iwC$$$$4feb7c724086d5df54804fec562ad72$$$$iwC$$iwC$$iwC$$iwC$$iwC$Stocks$$anonfun$1.apply(:456) at scala.collection.Iterator$$anon$11.next(Iterator.scala:328) at scala.collection.Iterator$$anon$11.next(Iterator.scala:328) at scala.collection.Iterator$$anon$11.next(Iterator.scala:328) at scala.collection.Iterator$$anon$11.next(Iterator.scala:328) at org.apache.spark.shuffle.sort.BypassMergeSortShuffleWriter.write(BypassMergeSortShuffleWriter.java:149) at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:73) at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41) at org.apache.spark.scheduler.Task.run(Task.scala:89) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227) ... 3 more