forked from Pivotal-Open-Source-Hub/StockInference-Spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
William Markito
committed
Aug 23, 2015
1 parent
2b3204f
commit 843fca6
Showing
12 changed files
with
66 additions
and
31 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
FinanceStreamSimulator/build/resources/main/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
serverUrl=http://localhost:9000 | ||
geodeUrl=http://geode-server:8080 | ||
numberOfMessages=1000 | ||
geodeUrl=http://localhost:8888 | ||
numberOfMessages=500 | ||
delayInMs=300 | ||
symbol=TSLA |
4 changes: 2 additions & 2 deletions
4
FinanceStreamSimulator/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
serverUrl=http://localhost:9000 | ||
geodeUrl=http://geode-server:8080 | ||
numberOfMessages=1000 | ||
geodeUrl=http://localhost:8888 | ||
numberOfMessages=500 | ||
delayInMs=300 | ||
symbol=TSLA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
#!/bin/bash | ||
|
||
SIMULATOR_CONTAINER=`docker ps |grep -i java:7 | awk '{print $1}'` | ||
|
||
echo Using Simulator container ID: $SIMULATOR_CONTAINER | ||
|
||
docker exec $SIMULATOR_CONTAINER FinanceStreamSimulator/gradlew -p FinanceStreamSimulator run | ||
gradle -p run | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
admin config server http://localhost:9393 | ||
|
||
stream create process_sink --definition "queue:stocks > transform --script='file:streaming/transform.groovy' | object-to-json | gemfire-json-server --useLocator=true --host=localhost --port=10334 --regionName=Stocks --keyExpression=payload.getField('entryTimestamp')" --deploy | ||
stream create process_sink --definition "queue:stocks > transform --script='file:./transform.groovy' | object-to-json | gemfire-json-server --useLocator=true --host=localhost --port=10334 --regionName=Stocks --keyExpression=payload.getField('entryTimestamp')" --deploy | ||
|
||
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 | ||
|
||
stream create http_source --definition "http --port=9000 | splitter --expression=#jsonPath(payload,'$') > queue:stocks" --deploy | ||
|
||
stream create --name r_process --definition "tap:stream:process_sink.transform > r-parsing: object-to-json | shell --command='Rscript streaming/tech_indicators.R' | formatting: splitter --expression=#jsonPath(payload,'$') | filter --expression=#jsonPath(payload,'$.rsi').indexOf('NaN')==-1 | object-to-json | gemfire-json-server --useLocator=true --host=locator --port=10334 --regionName=TechIndicators --keyExpression=payload.getField('entryTimestamp')" --deploy | ||
stream create --name r_process --definition "tap:stream:process_sink.transform > r-parsing: object-to-json | shell --command='Rscript ./tech_indicators.R' | formatting: splitter --expression=#jsonPath(payload,'$') | filter --expression=#jsonPath(payload,'$.rsi').indexOf('NaN')==-1 | object-to-json | gemfire-json-server --useLocator=true --host=locator --port=10334 --regionName=TechIndicators --keyExpression=payload.getField('entryTimestamp')" --deploy | ||
|
||
stream create --name prediction --definition "tap:stream:r_process.object-to-json > shell --command='./evaluate.sh' | gemfire-json-server --regionName=Predictions --host=localhost --port=10334 --useLocator=true --keyExpression=payload.getField('entryTimestamp')" --deploy | ||
|
||
stream create --name training --definition "trigger --fixedDelay=300 | shell --command='./train.sh'" --deploy | ||
stream create --name prediction --definition "tap:stream:r_process.object-to-json > shell --command='../evaluate.sh' | gemfire-json-server --regionName=Predictions --host=localhost --port=10334 --useLocator=true --keyExpression=payload.getField('entryTimestamp')" --deploy | ||
|
||
# stream create --name training --definition "trigger --fixedDelay=300 | shell --command='../train.sh'" --deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters