### Quickstart Commands Source: https://github.com/dbos-project/voltdb/blob/master/examples/geospatial/README.md Commands to initialize, start the database, load schema, preload data, and run the client application. ```bash voltdb init voltdb start ``` ```bash sqlcmd < ddl.sql ``` ```bash csvloader -f advertisers.csv advertisers ``` ```bash ./run.sh client ``` -------------------------------- ### Quickstart Commands Source: https://github.com/dbos-project/voltdb/blob/master/examples/metrocard/README.md Commands to initialize, start the database, load the schema, preload data, and run the demo client application. ```bash voltdb init voltdb start ``` ```bash sqlcmd < ddl.sql ``` ```bash csvloader --file data/stations.csv stations ``` ```bash ./run.sh client ``` ```bash ./run.sh webserver ``` -------------------------------- ### Quickstart Commands Source: https://github.com/dbos-project/voltdb/blob/master/examples/bank-offers/README.md Commands to initialize, start, and load the schema for the VoltDB database, and then run the demo client application. ```bash voltdb init voltdb start sqlcmd < ddl.sql ./run.sh client ``` -------------------------------- ### Quickstart Commands Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/README.md Commands to set up and run the fraud detection example application. ```bash ./run.sh server ./run.sh init ./run.sh train ./run.sh npminstall ./run.sh nodeserver ``` -------------------------------- ### Install and run serve Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Installs the serve package globally and starts a static server for the build directory. ```sh npm install -g serve serve -s build ``` -------------------------------- ### Running the VoltDB Client API Example Source: https://github.com/dbos-project/voltdb/blob/master/examples/user-hits/README.md Commands to start the server, initialize the database, and run the client test case. ```bash ./run.sh server ./run.sh init ./run.sh run-client ``` -------------------------------- ### Start the node server Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/README.md After running './run.sh server' and './run.sh init', use this command to start the node server. A window will pop up automatically. Changes to dev files will be hot-compiled. ```bash ./run.sh nodeserver ``` -------------------------------- ### Example Server Start Commands Source: https://github.com/dbos-project/voltdb/blob/master/tests/test_apps/priority/README.txt Commands to start the VoltDB server with different priority configurations. ```shell ./run.sh server_no_priority ``` ```shell ./run.sh server_no_priority ``` ```shell ./run.sh server_pure_priority ``` -------------------------------- ### Install npm dependencies Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/README.md Run this command to download the necessary npm dependencies for the project. This only needs to be run once. ```bash ./run.sh npminstall ``` -------------------------------- ### Example client call with parameters Source: https://github.com/dbos-project/voltdb/blob/master/examples/simple/README.md Example of calling the client with specific hostname and number of procedure calls. ```shell ./run_client.sh localhost 1000000 ``` -------------------------------- ### Initializing Test Environment Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Example of setting up a `src/setupTests.js` file to provide global setup or mock browser APIs for tests. ```javascript const localStorageMock = { getItem: jest.fn(), setItem: jest.fn(), clear: jest.fn() }; global.localStorage = localStorageMock ``` -------------------------------- ### Start a 3-node VoltDB cluster Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/RunAnExampleInACluster.md Command to start a 3-node VoltDB cluster, specifying the server count and hostnames. ```bash voltdb start -c 3 -H voltserver1,voltserver2,voltserver3 & ``` -------------------------------- ### Run script commands Source: https://github.com/dbos-project/voltdb/blob/master/examples/user-hits/README.md Commands to start the VoltDB server, initialize the database schema, and run the producer test case. ```bash ./run.sh server ./run.sh init ./run.sh run-producer ``` -------------------------------- ### VoltDB Initialization and Start with Options Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/RunServerInTheBackground.md These commands demonstrate starting VoltDB with common options, such as forcing initialization and specifying a deployment configuration file, and starting with cluster node count and coordinator hosts. ```bash voltdb init --force -C deployment.xml voltdb start -c [cluster-node-count] -H coordinator1,coordinator2 ``` -------------------------------- ### Adding a table to ddl.sql Source: https://github.com/dbos-project/voltdb/blob/master/examples/simple/README.md Example of adding a new table definition to the ddl.sql file. ```sql CREATE TABLE my_table ( id BIGINT NOT NULL, val BIGINT ); PARTITION TABLE my_table ON COLUMN id; CREATE INDEX my_table_idx1 ON my_table (id); ``` -------------------------------- ### VoltDB Initialization and Start Commands Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/EnableAuthentication.md Commands to initialize VoltDB with a deployment file and start the server. ```bash voltdb init --force -C deployment.xml voltdb start ``` -------------------------------- ### Create View Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of creating a view named 'registrations_by_zipcode'. ```sql CREATE VIEW registrations_by_zipcode ( zipcode, registered_voters ) AS SELECT zipcode, count(*) from voters where registration=1 GROUP BY zipcode; ``` -------------------------------- ### Example Usage Source: https://github.com/dbos-project/voltdb/blob/master/tools/zk_tools/zkdu/README.md This example shows how to use the zkdu command to display disk usage for ZooKeeper directories. ```bash zkdu /db/sync_snapshots/ zkdu /db/synchronized_states/ zkdu /db/topology/ zkdu /db/unfaulted_hosts/ zkdu /zookeeper/quota/ ``` -------------------------------- ### Setting up PATH environment variable Source: https://github.com/dbos-project/voltdb/blob/master/examples/simple/README.md Example of how to add the VoltDB bin subdirectory to your PATH environment variable. ```shell export PATH="$PATH:$HOME/voltdb-ent-8.2/bin" ``` -------------------------------- ### Starting Cluster 1 Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/xdcr_tutorial.md Command to start the nodes for the first cluster. ```bash voltdb start --host="node1,node2,node3" ``` -------------------------------- ### Start Cluster 2 Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/xdcr_tutorial.md Command to start Cluster 2 on multiple nodes. ```bash voltdb start --host="node4,node5,node6" ``` -------------------------------- ### Running the client with optional parameters Source: https://github.com/dbos-project/voltdb/blob/master/examples/simple/README.md Optional parameters for running the client, specifying hostname and number of procedure calls. ```shell ./run_client.sh {hostname} {number of procedure calls} ``` -------------------------------- ### Start VoltDB Cluster Source: https://github.com/dbos-project/voltdb/blob/master/tests/test_apps/ycsb/README.md Example command to start a VoltDB cluster with 3 nodes, assuming host0 is the leader. ```bash ./run.sh server host0 ``` -------------------------------- ### Usage and Parameters Source: https://github.com/dbos-project/voltdb/blob/master/tools/postinstall-script/README.md Shows how to run the postlaunch script and describes its command-line parameters. ```shell ./postlaunch.sh [--user username] [--password password] [--port portnumber] ``` -------------------------------- ### Starting additional clusters Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/xdcr_tutorial.md This command starts additional clusters. It's important to note that only one database can join the XDCR network at a time, and you must wait for initial synchronization before starting the next. ```bash voltdb start --host="node1,node2,node3" or voltdb start --host="node4,node5,node6" ``` -------------------------------- ### Setting up VoltDB CLI path and checking version Source: https://github.com/dbos-project/voltdb/blob/master/README.md Demonstrates how to add the VoltDB bin directory to the system's PATH and check the installed version. ```bash PATH="$PATH:$(pwd)/bin/" voltdb --version ``` -------------------------------- ### DR Table Declaration Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/xdcr_tutorial.md Example of how to declare a DR table in the schema. ```sql DR TABLE table_name_here; ``` -------------------------------- ### How to run this Source: https://github.com/dbos-project/voltdb/blob/master/tests/test_apps/polygonBenchmark/README.md Instructions on how to initialize and start the VoltDB server, and then run the benchmark script. ```bash voltdb init --force voltdb start ``` ```bash ./runbenchmark.sh ``` -------------------------------- ### Run the server and demo Source: https://github.com/dbos-project/voltdb/blob/master/tests/test_apps/osm-import/README.md Starts the local server and runs the OSM import demo. ```bash osm-import> ./run.sh ``` -------------------------------- ### Running the Example Application Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/bulkloader/README.md Bash script to compile and run the ExampleApp.java, which demonstrates both default insert and bulk loader performance. ```bash ./run_client.sh ``` -------------------------------- ### Explaining Stored Procedures Source: https://github.com/dbos-project/voltdb/blob/master/src/frontend/org/voltdb/utils/SQLCommandReadme.txt Example of using the EXPLAINPROC command to get execution plans for a stored procedure. ```sql explainproc Vote; ``` -------------------------------- ### Referencing Environment Variables in HTML Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Example of how to reference environment variables starting with REACT_APP_ directly in the public/index.html file. ```html %REACT_APP_WEBSITE_NAME% ``` -------------------------------- ### VoltDB Deployment File Configuration for XDCR Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/xdcr_tutorial.md An example snippet from a VoltDB deployment file showing the configuration for an XDCR role and its connection sources. ```xml ``` -------------------------------- ### Creating a Client Instance and Connecting Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/bulkloader/README.md This snippet shows the initial steps to create a VoltDB client instance and establish a connection to the database. ```java org.voltdb.client.Client client; client = ClientFactory.createClient(); client.createConnection("localhost"); ``` -------------------------------- ### Minimalist Printer Event Listener Source: https://github.com/dbos-project/voltdb/blob/master/third_party/cpp/googletest/googletest/docs/advanced.md An example of a custom event listener subclassing EmptyTestEventListener to handle test start, test part result, and test end events. ```c++ class MinimalistPrinter : public ::testing::EmptyTestEventListener { // Called before a test starts. virtual void OnTestStart(const ::testing::TestInfo& test_info) { printf("*** Test %s.%s starting.\n", test_info.test_suite_name(), test_info.name()); } // Called after a failed assertion or a SUCCESS(). virtual void OnTestPartResult(const ::testing::TestPartResult& test_part_result) { printf("%s in %s:%d\n%s\n", test_part_result.failed() ? "*** Failure" : "Success", test_part_result.file_name(), test_part_result.line_number(), test_part_result.summary()); } // Called after a test ends. virtual void OnTestEnd(const ::testing::TestInfo& test_info) { printf("*** Test %s.%s ending.\n", test_info.test_suite_name(), test_info.name()); } }; ``` -------------------------------- ### Create a Database Instance Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/DocumentYourDatabase.md Steps to prepare a directory for a database instance, including creating folders for the instance and snapshots, and copying necessary configuration files. ```bash mkdir $HOME/voltdb_instance mkdir $HOME/voltdb_saved_snapshots ``` ```bash # on each host cd $HOME/voltdb_instance voltdb init --force --config deployment.xml --license license.xml ``` -------------------------------- ### Using an image in CSS with Webpack Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md This example shows how Webpack can handle image imports within CSS files. Webpack finds relative module references (starting with './') and replaces them with the final paths from the compiled bundle. ```css .Logo { background-image: url(./logo.png); } ``` -------------------------------- ### Running the webserver on a cluster Source: https://github.com/dbos-project/voltdb/blob/master/examples/bank-offers/README.md Command to run the webserver on a VoltDB cluster node. ```bash ./run.sh webserver ``` -------------------------------- ### Install jsoncpp library Source: https://github.com/dbos-project/voltdb/blob/master/third_party/cpp/jsoncpp/CMakeLists.txt Installs the jsoncpp library targets to the appropriate directories based on the CMake installation variables. ```cmake install( TARGETS jsoncpp_lib ${INSTALL_EXPORT} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ``` -------------------------------- ### Compiling Java source code Source: https://github.com/dbos-project/voltdb/blob/master/examples/bank-offers/README.md Command to compile Java source code if running the example from a source build. ```bash run.sh jars ``` -------------------------------- ### Delete Only Table Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of dropping only a table. ```sql DROP TABLE voters; ``` -------------------------------- ### Drop Stored Procedure Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of dropping a stored procedure. ```sql DROP PROCEDURE procedureVotersA; ``` -------------------------------- ### run.sh script options Source: https://github.com/dbos-project/voltdb/blob/master/examples/bank-offers/README.md Various options for the run.sh script to manage the VoltDB example. ```bash - *run.sh* : start the server - *run.sh server* : start the server - *run.sh init* : compile stored procedures and load the schema and stored procedures - *run.sh jars* : compile all Java clients and stored procedures into two Java jarfiles - *run.sh client* : start the client, more than 1 client is permitted - *run.sh clean* : remove compilation and runtime artifacts - *run.sh cleanall* : remove compilation and runtime artifacts *and* the two included jarfiles - *run.sh webserver* : serve the web directory over http on port 8081 ``` -------------------------------- ### Execute Stored Procedure Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of executing a stored procedure. ```sql exec procedureVotersA; ``` -------------------------------- ### Run Demo Client and Web Server Source: https://github.com/dbos-project/voltdb/blob/master/examples/uniquedevices/README.md Scripts to preload data, run the demo client, and start the web server. ```bash ./run.sh client ``` ```bash ./run.sh webserver ``` -------------------------------- ### Install VoltDB Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/DocumentYourDatabase.md Steps to install VoltDB, create a user, extract the archive, set up a symlink, and add VoltDB to the PATH. ```bash cd /home/voltdb tar -xzvf LINUX-voltdb-ent-8.3.tar.gz ln -s voltdb-ent-8.3 voltdb export PATH=$PATH:$HOME/voltdb/bin ``` ```bash voltdb --version ``` -------------------------------- ### Index Creation Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of creating an index on the 'voters' table. ```sql CREATE INDEX voters_index ON voters ( zipcode ) ``` -------------------------------- ### Run the client application Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/RunAnExampleInACluster.md Command to execute the client script after configuring server connections. ```bash ./run.sh client ``` -------------------------------- ### Delete View and Table Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of dropping a view and a table. ```sql Drop view registrations_by_zipcode; DROP TABLE voters; ``` -------------------------------- ### Create Table Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of creating a table named 'voters'. ```sql CREATE TABLE voters ( name varchar(50), zipcode varchar(5), registration smallint ); ``` -------------------------------- ### run.sh Script Options Source: https://github.com/dbos-project/voltdb/blob/master/examples/callcenter/README.md Various options for the run.sh script. ```bash - *run.sh* : start the server - *run.sh server* : start the server - *run.sh init* : load the schema and stored procedures - *run.sh jars* : compile all Java clients and stored procedures into two Java jarfiles - *run.sh client* : start the client - *run.sh clean* : remove compilation and runtime artifacts - *run.sh cleanall* : remove compilation and runtime artifacts *and* the two included jarfiles - *run.sh webserver* : serve the web directory over http on port 8081 ``` -------------------------------- ### Install Java JDK Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/DocumentYourDatabase.md Command to install OpenJDK 8. ```bash apt-get install openjdk-8-jdk ``` -------------------------------- ### Initialize and start VoltDB Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/kafka_kerberos/README.md Commands to initialize and start VoltDB with Kerberos client configuration. ```bash export VOLTDB_OPTS="-Djava.security.auth.login.config=/home/opt/kerberos/voltdb.lan.jaas.kafka_client.conf -Djava.security.krb5.conf=/home/opt/kerberos/voltdb.lan.kafka.krb5.conf -Dsun.security.krb5.rcache=none" voltdb init --config=/home/zhe/workspace/deployment/depl.xml --force voltdb start --count=1 -H volt3d ``` -------------------------------- ### Example Deployment File Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/EnableAuthentication.md A basic XML deployment file that enables HTTP and JSON API. ```xml ``` -------------------------------- ### Serialized Class Example Source: https://github.com/dbos-project/voltdb/blob/master/third_party/java/src/org/apache/jute_voltpatches/package.html The XML-RPC serialized representation of the example class. ```XML MY_INT 5 MY_VEC 0.1 -0.89 2.45e4 MY_BUF %00\n\tabc%25 ``` -------------------------------- ### Install source-map-explorer Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Installs the source-map-explorer package using npm. ```sh npm install --save source-map-explorer ``` -------------------------------- ### Project Setup and Minimum Required Version Source: https://github.com/dbos-project/voltdb/blob/master/third_party/cpp/googletest/googlemock/CMakeLists.txt Sets the project name, version, languages, and the minimum required CMake version. Also configures ccache if available. ```cmake if (CMAKE_VERSION VERSION_LESS 3.0) project(gmock CXX C) else() cmake_policy (SET CMP0048 NEW) project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif () cmake_minimum_required(VERSION 2.6.4) find_program(CCACHE_PROGRAM ccache) if(CCACHE_PROGRAM) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") endif() ``` -------------------------------- ### run.sh Script Options Source: https://github.com/dbos-project/voltdb/blob/master/examples/voltkv/README.md Various options for the run.sh script to manage the VoltDB server, schema, clients, and cleanup. ```bash - run.sh : start the server - run.sh server : start the server - run.sh init : compile stored procedures and load the schema and stored procedures - run.sh jars : compile all Java clients into a Java jarfile - run.sh client : start the async client benchmark, initialize the given number of key-value pairs (puts) if needed, and begin normal client processing (gets and puts) - run.sh async-benchmark : same as run.sh client - run.sh sync-benchmark : start the multi-threaded sync client, initialize the given number of key-value pairs (puts) if needed, and begin normal client processing (gets and puts) - run.sh jdbc-benchmark : start the JDBC client benchmark - run.sh clean : remove compiled and other runtime artifacts - run.sh cleanall : remove compilation and runtime artifacts *and* the included client jarfile ``` -------------------------------- ### Install Styleguidist Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Install Styleguidist using npm or yarn. ```sh npm install --save react-styleguidist ``` ```sh yarn add react-styleguidist ``` -------------------------------- ### Install jest-enzyme Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Command to install jest-enzyme using npm. ```sh npm install --save jest-enzyme ``` -------------------------------- ### Client Behavior Options - Simulation Parameters Source: https://github.com/dbos-project/voltdb/blob/master/examples/windowing/README.md Parameters affecting the simulation behavior, such as row limits and age. ```bash --maxrows=0 \ (set to nonzero to limit by rowcount) --historyseconds=30 \ (set to nonzero to limit by age) --inline=false \ (set to true to delete co-txn with inserts) --deletechunksize=100 \ (target max number of rows to delete per txn) --deleteyieldtime=100 \ (time to wait between non-inline deletes) ``` -------------------------------- ### Install npm-run-all with yarn Source: https://github.com/dbos-project/voltdb/blob/master/examples/fraud-detection/web-node/fraud-detection-web/README.md Install npm-run-all using yarn. ```sh yarn add npm-run-all ``` -------------------------------- ### Installation Targets Source: https://github.com/dbos-project/voltdb/blob/master/src/ee/CMakeLists.txt Specifies where to install the VoltDB library and executables. ```cmake INSTALL(TARGETS ${VOLTDB_LIBNAME} DESTINATION ${CMAKE_BINARY_DIR}/nativelibs) INSTALL(TARGETS ${VOLTDB_IPCRUN_NAME} DESTINATION ${CMAKE_BINARY_DIR}/prod) ``` -------------------------------- ### Initializing and starting a single-server VoltDB database Source: https://github.com/dbos-project/voltdb/blob/master/README.md Commands to initialize a new VoltDB database directory and start a single-server instance, with options for specifying the directory and running in the background. ```bash voltdb init [--dir ~/mydb] voltdb start [--dir ~/mydb] [--background] ``` -------------------------------- ### Start Confluent Applications Source: https://github.com/dbos-project/voltdb/blob/master/tests/test_apps/topicbenchmark2/README.md Command to start the Confluent applications required for TopicBenchmark2 tests. ```bash confluent local start ``` -------------------------------- ### Loading compiled procedures Source: https://github.com/dbos-project/voltdb/blob/master/examples/simple/README.md Command to load compiled Java procedures into the database using sqlcmd. ```sql sqlcmd 1> load classes procedures/procedures.jar; ``` -------------------------------- ### Standalone CMake Project Setup (with samples) Source: https://github.com/dbos-project/voltdb/blob/master/third_party/cpp/googletest/googletest/README.md Commands to set up a standalone CMake project for Google Test, enabling sample builds. ```bash cmake -Dgtest_build_samples=ON ${GTEST_DIR} ``` -------------------------------- ### Class Definition Example Source: https://github.com/dbos-project/voltdb/blob/master/third_party/java/src/org/apache/jute_voltpatches/package.html An example of a class definition with different data types. ```Java class { int MY_INT; // value 5 vector MY_VEC; // values 0.1, -0.89, 2.45e4 buffer MY_BUF; // value '\00\n\tabc%' } ``` -------------------------------- ### Create Stored Procedure Source: https://github.com/dbos-project/voltdb/blob/master/tests/geb/vmc/src/resources/sqlQueryDbMonitor.txt Example of creating a stored procedure named 'procedureVotersA'. ```sql CREATE PROCEDURE procedureVotersA AS SELECT * FROM voters; ``` -------------------------------- ### Recall Command Example Source: https://github.com/dbos-project/voltdb/blob/master/src/frontend/org/voltdb/utils/SQLCommandReadme.txt Example of recalling a specific command by its line number. ```sqlcmd recall 123 ``` -------------------------------- ### Configure NTP Source: https://github.com/dbos-project/voltdb/blob/master/examples/HOWTOs/DocumentYourDatabase.md Example configuration for NTP to synchronize with Google's time servers. ```bash sudo vi /etc/ntp.conf server time1.google.com server time2.google.com server time3.google.com ```