currently I start voltDB by terminal command I want to know that, is there any option for start voltDB on runtime by using JSON interface or PHP .
Thank you
An example for Ubuntu Upstart for VoltDB 4.x Enterprise would be (update the paths and values accordingly):
cat << 'EOF' | sudo tee /etc/init/volt.conf
env VOLTDB_HEAPMAX=1024
start on runlevel [23]
stop on shutdown
chdir /home/ubuntu/data
exec /home/ubuntu/voltdb/bin/voltdb recover --deployment=prod.xml --host=db1 --license=license.xml
respawn
EOF
Note 1: db1
must be in the /etc/hosts
and it must point to the "leader" node (of your choosing) (you can also use an IP address directly)
Note 2: you first have to create/initialize the nodes by running the create
command, also with the --host=
parameter included.
Note 3: for the Community version, you have to perform voltadmin pause
and voltadmin save
before you restart the database process, and instead starting it with the recover
option, you start it with create
and then call voltadmin restore
with the appropriate parameters. (I haven't done this yet, perhaps consider starting the DB in a paused state and then resume it after the snapshot is loaded.)
VoltDB can be started from the command line (directly or using a script), or by VoltDB Enterprise Manager. Here are instructions on each of these methods:
Starting a VoltDB Database for the First Time (command line)
Running VoltDB Example Applications (using a script)
VoltDB Management Guide (using VoltDB Enterprise Manager)
The VoltDB JSON HTTP interface uses an embedded HTTP server that (optionally) runs on each node in the cluster and is started along with the database. It provides an HTTP interface to call stored procedures, system procedures, or Ad Hoc SQL statements via HTTP request, with responses in JSON-formatted text. It can be used to interact with a running database, but not to start one.