Pivotal-Open-Source-Hub / StockInference-Spark

Stock inference engine using Spring XD, Apache Geode / GemFire and Spark ML Lib.
http://pivotal-open-source-hub.github.io/StockInference-Spark
Apache License 2.0
382 stars 198 forks source link

Compiling Java Rich UI errors #2

Open mehmoodrehman opened 9 years ago

mehmoodrehman commented 9 years ago

Hi,

Nice Project, can't wait to see more documentation (specially around how to change stock market and analyse stocks).

I have built the VM using this repo, the VM is working well with test prediction data.

I am trying to compile the Java GUI on my mac but it is throwing errors.

Please help, I am not good at Java :(

Thanks in advance. Mehmood

java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)


Gradle 2.6

Build time: 2015-08-10 13:15:06 UTC Build number: none Revision: 233bbf8e47c82f72cb898b3e0a96b85d0aad166e

Groovy: 2.3.10 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_60 (Oracle Corporation 25.60-b23) OS: Mac OS X 10.10.5 x86_64


Lodhis-MacBook-Pro:JavaFXChart lodhi$ ./gradlew run


Error


23:35:17.991 [ERROR] [org.gradle.BuildExceptionReporter] 23:35:17.991 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 23:35:17.992 [ERROR] [org.gradle.BuildExceptionReporter] 23:35:17.992 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 23:35:17.992 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':runfx'. 23:35:17.992 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 23:35:17.993 [ERROR] [org.gradle.BuildExceptionReporter] 23:35:17.993 [ERROR] [org.gradle.BuildExceptionReporter] * Try: 23:35:17.993 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 23:35:17.994 [LIFECYCLE] [org.gradle.BuildResultLogger] 23:35:17.994 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED 23:35:17.995 [LIFECYCLE] [org.gradle.BuildResultLogger] 23:35:17.995 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 11.347 secs

markito commented 9 years ago

Hi Mehmood

Sorry it took us so long to answer this but for some reason we have not received the e-mail about this issue. Are you still experiencing the problem ?

mehmoodrehman commented 9 years ago

Hi Markito,

Thanks for getting back to me. Problem was resolved by building the GUI on Centos VM, Mac wasn't compiling the code properly.

While I have you here, I have it all working, and I can see the data as per your example, but I am still unsure how to set it up to pull feeds of Stocks e.g Stock from Australia, etc.

If there is more technical documentation, or more examples, I would love to get hold of it.

Thanks. Mehmood

markito commented 9 years ago

So as part of the SpringXD streams you can define any source for the stocks information. If you check the https://github.com/Pivotal-Open-Source-Hub/StockInference-Spark/blob/master/streaming/stream-create.xd you'll find an entry where we point to yahoo stocks web service:

stream create yahoo_finance_source --definition "trigger --cron='* * 7-13 * * MON-FRI' | http-client --url='''https://query.yahooapis.com/v1/public/yql?q=select Symbol, LastTradeDate, LastTradeTime, LastTradePriceOnly, DaysHigh, DaysLow, Open from yahoo.finance.quotes where symbol in (\"TSLA\")&format=json&env=store://datatables.org/alltableswithkeys''' --httpMethod=GET | splitter --expression=#jsonPath(payload,'$.query.results.quote') > queue:stocks" --deploy

You can replace the 'TSLA' (for Tesla) on that URL with 'ANZ.AX' for example:

https://query.yahooapis.com/v1/public/yql?q=select%20Symbol,%20LastTradeDate,%20LastTradeTime,%20LastTradePriceOnly,%20DaysHigh,%20DaysLow,%20Open%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22ANZ.AX%22)&format=json&env=store://datatables.org/alltableswithkeys

mehmoodrehman commented 9 years ago

Thanks,

I updated the query in stream-create.xd and destroyed the old stream and create new one. Even after running financial simulator, data is not updated. Is there any thing I am missing?

Cheers,