-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
25 lines (15 loc) · 1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Get data -
curl -L -O https://github.com/starksm64/RaspberryPiBeaconParser/raw/master/data/SevenScannersRun-2015-05-11.json.gz
Massage data, need 1:1 event:line -
gunzip -c SevenScannersRun-2015-05-11.json.gz | sed 's/}{/}\n{/' | awk '{ORS=""; print} /}/ {ORS="\n"; print ""}' > data.json
Run -
(only need to do this once)
sudo docker build -t taiol docker-taiol
(do this whenever you change the processing layer)
sudo docker build -t demo2015 docker-demo2015
sudo docker run -t demo2015 <src address, e.g. amqp://1.2.3.4/name> <dest address, e.g. amqp://1.2.3.4/name_processed>
Other -
Stage data: sudo docker run --privileged -w /mnt -v $PWD:/mnt -it taiol ./play.py data.json amqp://1.2.3.4/name
Fordwarder: sudo docker run --privileged -p 1984:1984 -w /mnt -v $PWD:/mnt -it taiol ./docker-demo2015/forward.py amqp://1.2.3.4/name
Archiver: ./archive amqp://1.2.3.4/name
Processor: sudo docker run --privileged -w /mnt -v $PWD:/mnt -it taiol spark-submit docker-demo2015/stage0.py -a amqp://1.2.3.4/name -d data.json