Skip to content

Local mode quick start

Vaggelis Nikolopoulos edited this page Jun 8, 2016 · 8 revisions

#Linux

Software Dependencies

  • JDK 1.7, can be installed with:
sudo apt-get install openjdk-7-jdk
  • Python 2.7, it is probably allready installed in your system. You can verify that by running:
$ python --version
Python 2.7.6
$ sudo apt-get install python-apsw

Installing from tarball

After installing the software dependencies you can unpack the tarball by executing :

$ mkdir ~/exareme
$ tar xf exareme-*tar.gz -C ~/exareme
$ cd ~/exareme

Configure

Make sure ~/exareme/etc/exareme/master file containing your localhost ip 127.0.0.1 and ~/exareme/etc/exareme/workers is empty by running:

$ echo "127.0.0.1" > ~/exareme/etc/exareme/master
$ echo "" > ~/exareme/etc/exareme/worker

Running Exareme

In ~/exareme/bin directory, you can find the exareme-admin.sh script which is responsible for the administration tasks.

$ cd ~/exareme
Start
$ ./bin/exareme-admin.sh --start
Check status
$ ./bin/exareme-admin.sh --status
user    11358  1811 51 14:20 pts/4    00:00:02 /usr/bin/java -cp /home/user/exareme/lib/exareme/*:/home/user/exareme/lib/exareme/external/* -Xms512M -Xmx2046M -Djava.rmi.server.codebase=file:/home/user/exareme/lib/exareme/ -Djava.security.policy=/home/user/exareme/etc/exareme/art.policy -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.port=10000 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.security.egd=file:///dev/urandom madgik.exareme.master.admin.StartMaster
Run simple query through exareme console
Open exareme console
$ cd ~/exareme
$ ./bin/exareme-admin.sh --console
mTerm - version 1.0
running on Python: 2.7.6, APSW: 3.8.2-r1, SQLite: 3.8.2, madIS: 1.9
Enter ".help" for instructions
Enter SQL statements terminated with a ";" 
mterm>
Create a table containing integers from 1 to 100.

In this example your database directory will be /tmp/db.

mterm> exaquery db:/tmp/db distributed create table test as select * from range(100);
Proc: 100 % Data: 200 % Errors: 0
Proc: 100 % Data: 200 % Errors: 0
Successfully executed in 0:00 m.
--- [0|Column names ---
[1|status 
Query executed and displayed 3 rows in 0 min. 2 sec 440 msec.
Display records of table
mterm> exaresult db:/tmp/db test;
1
2
.
.
100
--- [0|Column names ---
[1|C1 
Query executed and displayed 100 rows in 0 min. 2 sec 68 msec.
Drop table
mterm> exaquery db:/tmp/db distributed drop table test;
Proc: 100 % Data 0% Errors: 0
Proc: 100 % Data 0% Errors: 0
Successfully executed in 0:00 m.
--- [0|Column names ---
[1|status 
Query executed and displayed 3 rows in 0 min. 2 sec 404 msec.
Exit exareme console
mterm> .quit
Stop
$ ./bin/exareme-admin.sh --stop
Kill, WARNING this will kill all your java and python processes!
$ ./bin/exareme-admin.sh --kill