Public Repository

Last pushed: 4 months ago
Short Description
voltdb tutorials
Full Description

2017-3-13
https://docs.voltdb.com/tutorial/

https://www.voltdb.com/run-voltdb-virtualized-containerized-or-cloud

The base image is java:08 ( debian version, openjdk-1.8)

2017-3-14
version 06: finish the tutorial 1-6. The tutorial6/ has already save the full database.
cd /root/voltdb-tutorial/part6; voltdb start
http://IP:8080

2017-7-21
VoltDB企业版有license限制,之前上传的06版本过期了。这次使用社区版,基本功能都有,就是不能持久化,需要手工加载数据。

启动容器: docker run -v /root/mnt:/root/mnt -p 8080:8080 -p 80:80 -it shenqian/voltdb:13 bash

启动voltdb: $ voltdb start (in /root/voltdb-root)

加载schema: $ sqlcmd  (in /root/voltdb-tutorials/part6/ 以后都在这个目录)
1> FILE towns-1.sql;

加载数据:
csvloader --separator "|" --skip 1 --file data/towns.txt towns
csvloader --file data/people.txt --skip 1 people
csvloader --separator "," --skip 1 --file data/states.csv states

更新schema:
1> ALTER TABLE towns DROP COLUMN state;
2> ALTER TABLE people DROP COLUMN state;

加载存储过程:
$ sqlcmd
1> load classes storedprocs.jar;
2> file weather.sql;

Running the LoadWeather Application

    # export PYTHONPATH="/root/voltdb/git/voltdb/lib/python/"
    # python LoadWeather.py < data/alerts.xml

Run apache

    # /etc/init.d/apache2 start

访问:http://127.0.0.1/MyWeather/MyWeather.html   
查看 Androscoggin County in Maine (缅因州 安德罗斯科金县)

Docker Pull Command
Owner
shenqian