仮想アプライアンス VoltDB VMWare Image - VoltDB 5.4 Demo on Ubuntu 14.04

http://voltdb.com/run-voltdb-vmware からVoltDB Demo VMWare Imageをダウンロードしてみました。今は 1.54GBの VoltDB-Ubuntu-x64-14.04-LTS-v5.4-Demo.zipでした。
任意のディレクトリでunzipしてみました。全部で6GB程度のファイル群でした。
VMware Playerで作成されたファイルの中から VoltDB-Ubuntu-x64-14.04.1-LTS.vmxを開きました。そしてメモリ2GBと2つのCPUの仮想マシンを起動してみると、こんな感じ。

Terminalを起動すると、こんな感じ。

:: Welcome to the VoltDB VMware Demo ::

Please visit http://voltdb.com for more information.

~/voltdb/examples has various runnable samples in separate subdirectories.

Useful commands in  ~/voltdb/bin (see documentation):
  Database startup             voltdb create ...
  Database administration      voltadmin COMMAND ...
  Interactive SQL interpreter  sqlcmd

Command Help:
  General voltdb usage  voltdb -h
  Administration        voltadmin help [COMMAND]
  SQL interpreter       sqlcmd --help

Documentation:
  "VoltDB Tutorial"      http://voltdb.com/docs/tutorial/
  "Using VoltDB"         http://voltdb.com/docs/UsingVoltDB/

Quick example:
  $ cd voter
  $ voltdb create &  # (start VoltDB in the background)
  $ sqlcmd < ddl.sql # (load the schema and procedures)
  $ ./run.sh client  # (run the sample client for 2 minutes)
  $ kill %1          # (kill the background server)

voltdb@ubuntu:~/voltdb/examples$ 

ここに書かれていることを、ちょっとやってみます。

voltdb@ubuntu:~/voltdb/examples$ cd voter
voltdb@ubuntu:~/voltdb/examples/voter$ voltdb create & 
[1] 26295
voltdb@ubuntu:~/voltdb/examples/voter$ Initializing VoltDB...

 _    __      ____  ____  ____ 
| |  / /___  / / /_/ __ \/ __ )
| | / / __ \/ / __/ / / / __  |
| |/ / /_/ / / /_/ /_/ / /_/ / 
|___/\____/_/\__/_____/_____/

--------------------------------

Build: 5.4 voltdb-5.4-0-g4a2c380-local Enterprise Edition
Connecting to VoltDB cluster as the leader...
Host id of this node is: 0
Starting VoltDB with trial license. License expires on Aug 24, 2015.
Initializing the database and command logs. This may take a moment...
WARN: This is not a highly available cluster. K-Safety is set to 0.
Server completed initialization.

voltdb@ubuntu:~/voltdb/examples/voter$ 
voltdb@ubuntu:~/voltdb/examples/voter$ sqlcmd < ddl.sql

FILE -inlinebatch END_OF_BATCH


-- contestants table holds the contestants numbers (for voting) and names
CREATE TABLE contestants
(
  contestant_number integer     NOT NULL
, contestant_name   varchar(50) NOT NULL
, CONSTRAINT PK_contestants PRIMARY KEY
  (
    contestant_number
  )
);

-- votes table holds every valid vote.
--   voters are not allowed to submit more than <x> votes, x is passed to client application
CREATE TABLE votes
(
  phone_number       bigint     NOT NULL
, state              varchar(2) NOT NULL
, contestant_number  integer    NOT NULL
);

PARTITION TABLE votes ON COLUMN phone_number;

-- Map of Area Codes and States for geolocation classification of incoming calls
CREATE TABLE area_code_state
(
  area_code smallint   NOT NULL
, state     varchar(2) NOT NULL
, CONSTRAINT PK_area_code_state PRIMARY KEY
  (
    area_code
  )
);

-- rollup of votes by phone number, used to reject excessive voting
CREATE VIEW v_votes_by_phone_number
(
  phone_number
, num_votes
)
AS
   SELECT phone_number
        , COUNT(*)
     FROM votes
 GROUP BY phone_number
;

-- rollup of votes by contestant and state for the heat map and results
CREATE VIEW v_votes_by_contestant_number_state
(
  contestant_number
, state
, num_votes
)
AS
   SELECT contestant_number
        , state
        , COUNT(*)
     FROM votes
 GROUP BY contestant_number
        , state
;


Batch command succeeded.

LOAD CLASSES voter-procs.jar;
Command succeeded.

FILE -inlinebatch END_OF_2ND_BATCH


-- stored procedures
CREATE PROCEDURE FROM CLASS voter.Initialize;
CREATE PROCEDURE FROM CLASS voter.Results;
CREATE PROCEDURE PARTITION ON TABLE votes COLUMN phone_number FROM CLASS voter.Vote;
CREATE PROCEDURE FROM CLASS voter.ContestantWinningStates;
CREATE PROCEDURE FROM CLASS voter.GetStateHeatmap;


Batch command succeeded.

voltdb@ubuntu:~/voltdb/examples/voter$ 
voltdb@ubuntu:~/voltdb/examples/voter$ ./run.sh client 
--------------------------------------------------------------------------------
 Command Line Configuration
--------------------------------------------------------------------------------

contestants = 6
displayinterval = 5
duration = 120
latencyreport = false
maxvotes = 2
password = 
ratelimit = 2000000
servers = localhost:21212
statsfile = 
user = 
warmup = 5

--------------------------------------------------------------------------------
 Setup & Initialization
--------------------------------------------------------------------------------

Connecting to VoltDB...
Connected to VoltDB node at: localhost:21212.

Populating Static Tables

--------------------------------------------------------------------------------
 Starting Benchmark
--------------------------------------------------------------------------------

Warming up...

Running benchmark...
00:00:05 Throughput 5670/s, Aborts/Failures 0/0
00:00:10 Throughput 20858/s, Aborts/Failures 0/0
00:00:15 Throughput 19777/s, Aborts/Failures 0/0
00:00:20 Throughput 13813/s, Aborts/Failures 0/0
00:00:25 Throughput 12005/s, Aborts/Failures 0/0
00:00:30 Throughput 15606/s, Aborts/Failures 0/0
00:00:35 Throughput 11873/s, Aborts/Failures 0/0
00:00:40 Throughput 16318/s, Aborts/Failures 0/0
00:00:45 Throughput 19034/s, Aborts/Failures 0/0
00:00:50 Throughput 14023/s, Aborts/Failures 0/0
00:00:55 Throughput 20024/s, Aborts/Failures 0/0
00:01:00 Throughput 18939/s, Aborts/Failures 0/0
00:01:05 Throughput 22338/s, Aborts/Failures 0/0
00:01:10 Throughput 21890/s, Aborts/Failures 0/0
00:01:15 Throughput 28782/s, Aborts/Failures 0/0
00:01:20 Throughput 29691/s, Aborts/Failures 0/0
00:01:25 Throughput 24528/s, Aborts/Failures 0/0
00:01:30 Throughput 35534/s, Aborts/Failures 0/0
00:01:35 Throughput 40587/s, Aborts/Failures 0/0
00:01:40 Throughput 35846/s, Aborts/Failures 0/0
00:01:45 Throughput 38548/s, Aborts/Failures 0/0
00:01:50 Throughput 45244/s, Aborts/Failures 0/0
00:01:55 Throughput 42410/s, Aborts/Failures 0/0
00:02:00 Throughput 43027/s, Aborts/Failures 0/0

--------------------------------------------------------------------------------
 Voting Results
--------------------------------------------------------------------------------

A total of 2,982,362 votes were received during the benchmark...
 - 2,952,757 Accepted
 -    29,603 Rejected (Invalid Contestant)
 -         2 Rejected (Maximum Vote Count Reached)
 -         0 Failed (Transaction Error)

Contestant Name		Votes Received
Edwina Burnam		       753,496
Jessie Eichman		       621,932
Alana Bregman		       447,324
Kelly Clauss		       392,582
Tabatha Gehling		       378,407
Jessie Alloway		       372,479

The Winner is: Edwina Burnam

--------------------------------------------------------------------------------
 Client Workload Statistics
--------------------------------------------------------------------------------

Average throughput:               24,838 txns/sec
voltdb@ubuntu:~/voltdb/examples/voter$ 


ちょっとつまらないので、もう少し。

voltdb@ubuntu:~/voltdb/examples/voter$ sqlcmd
SQL Command :: localhost:21212
1> list tables

--- User Tables --------------------------------------------
AREA_CODE_STATE
CONTESTANTS
VOTES


--- User Views --------------------------------------------
V_VOTES_BY_CONTESTANT_NUMBER_STATE
V_VOTES_BY_PHONE_NUMBER


--- User Export Streams --------------------------------------------


3> select * from votes;
VOLTDB ERROR: SQL ERROR
  Output from SQL stmt overflowed output/network buffer of 50mb (-32k for message headers). Try a "limit" clause or a stronger predicate.
4> select count(*) from votes;
C1      
--------
 2966220

(Returned 1 rows in 0.07s)
6> exit

voltdb@ubuntu:~/voltdb/examples$ voltdb --version
voltdb version 5.4
voltdb@ubuntu:~/voltdb/examples$ 
voltdb@ubuntu:~/voltdb/examples/voter$ ps -ef | grep VoltDB
voltdb   26295 26277 11 16:24 pts/0    00:03:17 /usr/bin/java -Xmx2048m -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=300 -Dsun.net.inetaddr.negative.ttl=3600 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseTLAB -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCondCardMark -Dsun.rmi.dgc.server.gcInterval=9223372036854775807 -Dsun.rmi.dgc.client.gcInterval=9223372036854775807 -XX:CMSWaitDuration=120000 -XX:CMSMaxAbortablePrecleanTime=120000 -XX:+ExplicitGCInvokesConcurrent -XX:+CMSScavengeBeforeRemark -XX:+CMSClassUnloadingEnabled -XX:PermSize=64m -Dlog4j.configuration=file:///home/voltdb/voltdb-ent-5.4/voltdb/log4j.xml -Djava.library.path=dummyvalue -classpath /home/voltdb/voltdb-ent-5.4/voltdb/voltdb-5.4.jar:/home/voltdb/voltdb-ent-5.4/lib/protobuf-java-2.5.0.jar:/home/voltdb/voltdb-ent-5.4/lib/commons-lang3-3.0.jar:/home/voltdb/voltdb-ent-5.4/lib/super-csv-2.1.0.jar:/home/voltdb/voltdb-ent-5.4/lib/avro-1.7.7.jar:/home/voltdb/voltdb-ent-5.4/lib/jsch-0.1.51.jar:/home/voltdb/voltdb-ent-5.4/lib/jetty-http-7.6.1.v20120215.jar:/home/voltdb/voltdb-ent-5.4/lib/jetty-server-7.6.1.v20120215.jar:/home/voltdb/voltdb-ent-5.4/lib/httpcore-4.3.2.jar:/home/voltdb/voltdb-ent-5.4/lib/metrics-core-2.2.0.jar:/home/voltdb/voltdb-ent-5.4/lib/httpcore-nio-4.3.2.jar:/home/voltdb/voltdb-ent-5.4/lib/groovy-all-2.1.7-indy.jar:/home/voltdb/voltdb-ent-5.4/lib/slf4j-nop-1.6.2.jar:/home/voltdb/voltdb-ent-5.4/lib/jetty-util-7.6.1.v20120215.jar:/home/voltdb/voltdb-ent-5.4/lib/servlet-api-2.5.jar:/home/voltdb/voltdb-ent-5.4/lib/httpclient-4.3.2.jar:/home/voltdb/voltdb-ent-5.4/lib/snappy-java-1.1.0.1.jar:/home/voltdb/voltdb-ent-5.4/lib/commons-cli-1.2.jar:/home/voltdb/voltdb-ent-5.4/lib/scala-library.jar:/home/voltdb/voltdb-ent-5.4/lib/felix.jar:/home/voltdb/voltdb-ent-5.4/lib/httpasyncclient-4.0.1.jar:/home/voltdb/voltdb-ent-5.4/lib/kafka_2.8.0-0.8.1.jar:/home/voltdb/voltdb-ent-5.4/lib/jackson-core-asl-1.9.13.jar:/home/voltdb/voltdb-ent-5.4/lib/log4j-1.2.16.jar:/home/voltdb/voltdb-ent-5.4/lib/jetty-io-7.6.1.v20120215.jar:/home/voltdb/voltdb-ent-5.4/lib/jna.jar:/home/voltdb/voltdb-ent-5.4/lib/slf4j-api-1.6.2.jar:/home/voltdb/voltdb-ent-5.4/lib/tomcat-jdbc.jar:/home/voltdb/voltdb-ent-5.4/lib/jackson-mapper-asl-1.9.13.jar:/home/voltdb/voltdb-ent-5.4/lib/commons-logging-1.1.3.jar:/home/voltdb/voltdb-ent-5.4/lib/jetty-continuation-7.6.1.v20120215.jar:/home/voltdb/voltdb-ent-5.4/lib/commons-codec-1.6.jar:/home/voltdb/voltdb-ent-5.4/lib/tomcat-juli.jar:/home/voltdb/voltdb-ent-5.4/lib/jline-2.10.jar:/home/voltdb/voltdb-ent-5.4/lib/extension/voltdb-rabbitmq.jar org.voltdb.VoltDB create host localhost:3021
voltdb   27281 26277  0 16:53 pts/0    00:00:00 grep --color=auto VoltDB
voltdb@ubuntu:~/voltdb/examples/voter$ kill %1
voltdb@ubuntu:~/voltdb/examples/voter$ WARN: The VoltDB server will shut down due to a control-C or other JVM exit.

[1]+  Exit 143                voltdb create
voltdb@ubuntu:~/voltdb/examples/voter$ ps -ef | grep VoltDB
voltdb   27288 26277  0 16:54 pts/0    00:00:00 grep --color=auto VoltDB
voltdb@ubuntu:~/voltdb/examples/voter$ 

今日のところは、これまで。