These instructions will install the development environment into your local machine
-
Install maven
$ brew install maven
$ sudo apt-get install maven
-
Clone the repository, or download source code
$ git clone https://github.com/lobo/pod-tpe
or
$ wget https://github.com/lobo/pod-tpe/archive/master.zip
- Clone the repo
- Run:
$ mvn clean install eclipse:eclipse
There are two files (CSV format) to use in this project. Both should be located in the following path:
client/src/main/resources/files/filename.csv
The files with the data are listed below (in a Google Drive public folder):
First, run ./make.sh
to generate scripts
- cd to
server/target/tpe-server-1.0-SNAPSHOT/
- run
./run-node.sh
NOTE: make sure to activate interfaces (false->true) and specify network in hazelcast.xml to activate multiple nodes in different computers. All computers need to have same hazelcast.xml
- cd to
client/target/tpe-client-1.0-SNAPSHOT/
- run
./run-client -Daddresses=xx.xx.xx.xx;yy.yy.yy.yy -Dquery=1 -DmovementsInPath=movimientos.csv -DairportsInPath=aeropuertos.csv -DoutPath=output.csv
- run
./run-client -Daddresses=xx.xx.xx.xx;yy.yy.yy.yy -Dquery=2 -DmovementsInPath=movimientos.csv -DairportsInPath=aeropuertos.csv -DoutPath=output.csv
- run
./run-client -Daddresses=xx.xx.xx.xx;yy.yy.yy.yy -Dquery=3 -DmovementsInPath=movimientos.csv -DairportsInPath=aeropuertos.csv -DoutPath=output.csv
- run
./run-client -Daddresses=xx.xx.xx.xx;yy.yy.yy.yy -Dquery=4 -DmovementsInPath=movimientos.csv -DairportsInPath=aeropuertos.csv -DoutPath=output.csv -Doaci=SAEZ -Dn=5
- Notice here the query parameters are:
oaci=SAEZ
andn=5
.
- run
./run-client -Daddresses=xx.xx.xx.xx;yy.yy.yy.yy -Dquery=5 -DmovementsInPath=movimientos.csv -DairportsInPath=aeropuertos.csv -DoutPath=output.csv -Dn=5
- Notice here the query parameter is:
n=5
.
- run
./run-client -Daddresses=xx.xx.xx.xx;yy.yy.yy.yy -Dquery=6 -DmovementsInPath=movimientos.csv -DairportsInPath=aeropuertos.csv -DoutPath=output.csv -Dmin=3
- Notice here the query parameter is:
min=3
.
-
Open Eclipse
- Import as existing project
-
Open run-configuration for client and set VM arguments
-
Move hazelcast from
server/target/tpe-server-1.0-SNAPSHOT/
toserver/
-
Create run-configuration named
node
with main class:com.hazelcast.console.ConsoleApp
-
Run node main
-
Run client
NOTE: if after running mvn clean install
or ./make.sh
, if want to work again from Eclipse, go to Project->Clean
.