GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltdb.com — voltdb

  • Volt Active Data
  • Developer Hub
  • Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Administrator's Guide
    • Volt Kubernetes Administrator's Guide
    • VoltDB Quick Reference
  • VoltDB V16
    • VoltDB V16
    • VoltDB V15.3 LTS
    • VoltDB V14.3 LTS
    • VoltDB V13.3 LTS
    • VoltDB V12.3 LTS
    • VoltDB V11.4
    • VoltDB V10.2
    • VoltDB V9.3
voltdb

Using VoltDB

  • About This Book
  • 1. Overview▶
    • 1.1. What is VoltDB?
    • 1.2. Who Should Use VoltDB
    • 1.3. How VoltDB Works
      • 1.3.1. Partitioning
      • 1.3.2. Serialized (Single-Threaded) Processing
      • 1.3.3. Partitioned vs. Replicated Tables
      • 1.3.4. Ease of Scaling to Meet Application Needs
    • 1.4. Working with VoltDB Effectively
  • 2. Installing VoltDB▶
    • 2.1. Operating System and Software Requirements
    • 2.2. Installing VoltDB
      • 2.2.1. Upgrading From Older Versions
    • 2.3. Setting Up Your Environment
    • 2.4. What is Included in the VoltDB Distribution
  • 3. Starting the Database▶
    • 3.1. Initializing and Starting a VoltDB Database
    • 3.2. Initializing and Starting a VoltDB Database on a Cluster
    • 3.3. Stopping a VoltDB Database
    • 3.4. Saving the Data
    • 3.5. Restarting a VoltDB Database
    • 3.6. Updating Nodes on the Cluster
    • 3.7. Defining the Cluster Configuration
      • 3.7.1. Determining How Many Sites per Host
      • 3.7.2. Configuring Paths for Runtime Features
      • 3.7.3. Verifying your Hardware Configuration
  • 4. Designing the Database Schema▶
    • 4.1. How to Enter DDL Statements
    • 4.2. Creating Tables and Primary Keys
    • 4.3. Analyzing Data Volume and Workload
    • 4.4. Partitioning Database Tables
      • 4.4.1. Choosing a Column on which to Partition Table Rows
      • 4.4.2. Specifying Partitioned Tables
      • 4.4.3. Design Rules for Partitioning Tables
    • 4.5. Replicating Database Tables
      • 4.5.1. Choosing Replicated Tables
      • 4.5.2. Specifying Replicated Tables
    • 4.6. Modifying the Schema
      • 4.6.1. Effects of Schema Changes on Data and Clients
      • 4.6.2. Viewing the Schema
      • 4.6.3. Modifying Tables
      • 4.6.4. Adding and Dropping Indexes
      • 4.6.5. Modifying Partitioning for Tables and Stored Procedures
  • 5. Designing Stored Procedures to Access the Database▶
    • 5.1. How Stored Procedures Work
      • 5.1.1. VoltDB Stored Procedures are Transactional
      • 5.1.2. VoltDB Stored Procedures are Deterministic
    • 5.2. The Anatomy of a VoltDB Stored Procedure
      • 5.2.1. The Structure of the Stored Procedure
      • 5.2.2. Passing Arguments to a Stored Procedure
      • 5.2.3. Creating and Executing SQL Queries in Stored Procedures
      • 5.2.4. Interpreting the Results of SQL Queries
      • 5.2.5. Returning Results from a Stored Procedure
      • 5.2.6. Rolling Back a Transaction
    • 5.3. Installing Stored Procedures into the Database
      • 5.3.1. Compiling, Packaging, and Loading Stored Procedures
      • 5.3.2. Declaring Stored Procedures in the Schema
      • 5.3.3. Partitioning Stored Procedures in the Schema
  • 6. Designing VoltDB Client Applications▶
    • 6.1. Connecting to the VoltDB Database
      • 6.1.1. How Connections To The Cluster Work
      • 6.1.2. Specifying Multiple Servers
    • 6.2. Invoking Stored Procedures
    • 6.3. Invoking Stored Procedures Asynchronously
    • 6.4. Defining Options on a Per-Call Basis
    • 6.5. Closing the Connection
    • 6.6. Handling Errors
      • 6.6.1. Interpreting Execution Errors
      • 6.6.2. Handling Timeouts
      • 6.6.3. Writing Handlers to Interpret Other Errors
    • 6.7. Compiling and Running Client Applications
      • 6.7.1. Starting the Client Application
      • 6.7.2. Running Clients from Outside the Cluster
  • 7. Simplifying Application Development▶
    • 7.1. Using Default Procedures
    • 7.2. Shortcut for Defining Simple Stored Procedures
    • 7.3. Verifying Expected Query Results
    • 7.4. Scheduling Stored Procedures as Tasks
    • 7.5. Directed Procedures: Distributing Transactions to Every Partition
  • 8. Using VoltDB with Other Programming Languages▶
    • 8.1. C++ Client Interface
      • 8.1.1. Writing VoltDB Client Applications in C++
      • 8.1.2. Creating a Connection to the Database Cluster
      • 8.1.3. Invoking Stored Procedures
      • 8.1.4. Invoking Stored Procedures Asynchronously
      • 8.1.5. Interpreting the Results
    • 8.2. JSON HTTP Interface
      • 8.2.1. How the JSON Interface Works
      • 8.2.2. Using the JSON Interface from Client Applications
      • 8.2.3. How Parameters Are Interpreted
      • 8.2.4. Interpreting the JSON Results
      • 8.2.5. Error Handling using the JSON Interface
      • 8.2.6. Managing Client Sessions
    • 8.3. JDBC Interface
      • 8.3.1. Using JDBC to Connect to a VoltDB Database
      • 8.3.2. Using JDBC to Query a VoltDB Database
    • 8.4. Python Client Interface
      • 8.4.1. Creating a Connection to the Database Cluster
      • 8.4.2. Invoking Stored Procedures
      • 8.4.3. Invoking Stored Procedures Asynchronously
      • 8.4.4. Interpreting the Results
      • 8.4.5. Closing the Connections to the Database Cluster
  • 9. Integrating Volt Active Data with AI Agents and Chatbots▶
    • 9.1. Volt Agent Skills
      • 9.1.1. Installing Volt Skills
      • 9.1.2. Using Volt Skills Effectively
    • 9.2. The VoltDB MCP Server
      • 9.2.1. Installing the VoltDB MCP Server
      • 9.2.2. Configuring the MCP Server
      • 9.2.3. How to Use the VoltDB MCP Server
  • 10. Using VoltDB in a Cluster▶
    • 10.1. Starting a Database Cluster
    • 10.2. Defining the Cluster Configuration
    • 10.3. Elastic Scaling to Resize the Cluster
      • 10.3.1. Adding Nodes with Elastic Scaling
      • 10.3.2. Removing Nodes with Elastic Scaling
      • 10.3.3. Configuring How VoltDB Rebalances Nodes During Elastic Scaling
  • 11. Availability▶
    • 11.1. How K-Safety Works
    • 11.2. Enabling K-Safety
      • 11.2.1. What Happens When You Enable K-Safety
      • 11.2.2. Calculating the Appropriate Number of Nodes for K-Safety
    • 11.3. Recovering from System Failures
      • 11.3.1. What Happens When a Node Rejoins the Cluster
      • 11.3.2. Where and When Recovery May Fail
    • 11.4. Avoiding Network Partitions
      • 11.4.1. K-Safety and Network Partitions
      • 11.4.2. Network Fault Protection
  • 12. Active(N) Database Replication▶
    • 12.1. How Database Replication Works
      • 12.1.1. Starting Database Replication
      • 12.1.2. Database Replication, Availability, and Disaster Recovery
      • 12.1.3. Database Replication and Completeness
    • 12.2. Using Active(N) Cross Datacenter Replication
      • 12.2.1. Designing Your Schema for Active Replication
      • 12.2.2. Configuring the Database Clusters
      • 12.2.3. Starting the Database Clusters
      • 12.2.4. Loading a Matching Schema and Starting Replication
      • 12.2.5. Stopping Replication
      • 12.2.6. Example XDCR Configurations
      • 12.2.7. Understanding Conflict Resolution
    • 12.3. Updating the Schema During Replication
      • 12.3.1. Safely Updating the Schema While the Clusters are Paused
      • 12.3.2. Adding and Removing Tables Without Pausing
      • 12.3.3. Using Dynamic Schema Change to Add, Remove, and Modify Table Columns Without Pausing
    • 12.4. Monitoring Database Replication
    • 12.5. Tuning Active(N) to Meet Your Application Needs
      • 12.5.1. The XDCR Workflow
      • 12.5.2. Detecting and Correcting Bottlenecks in the XDCR Workflow
  • 13. Security▶
    • 13.1. How Security Works in VoltDB
    • 13.2. Enabling Authentication and Authorization
    • 13.3. Defining Users and Roles
    • 13.4. Assigning Access to Stored Procedures
    • 13.5. Assigning Access by Function (System Procedures, SQL Queries, and Default Procedures)
    • 13.6. Using Built-in Roles
    • 13.7. Encrypting VoltDB Communication Using TLS/SSL
      • 13.7.1. Creating the TLS/SSL Certificates
      • 13.7.2. Using Certificate Revocation Lists (CRLs)
      • 13.7.3. Configuring TLS/SSL on the VoltDB Server
      • 13.7.4. Configuring Mutual TLS/SSL on the Server and Clients
      • 13.7.5. Using the VoltDB Command Line Utilities with TLS/SSL
      • 13.7.6. Implementing TLS/SSL in the Java Client Applications
      • 13.7.7. Configuring Database Replication (XDCR) With TLS/SSL
      • 13.7.8. Updating TLS/SSL Certificates and Certificate Revocation Lists (CRLs)
    • 13.8. Integrating LDAP Security with VoltDB
      • 13.8.1. Configuring LDAP Security in VoltDB
      • 13.8.2. Configuring VoltDB Security in LDAP
    • 13.9. Integrating Kerberos Security with VoltDB
      • 13.9.1. Installing and Configuring Kerberos
      • 13.9.2. Configuring Java Security
      • 13.9.3. Configuring the VoltDB Servers and Clients
      • 13.9.4. Accessing the Database from the Command Line and the Web
  • 14. Saving & Restoring a VoltDB Database▶
    • 14.1. Performing a Manual Save and Restore of a VoltDB Cluster
      • 14.1.1. How to Save the Contents of a VoltDB Database
      • 14.1.2. How to Restore the Contents of a VoltDB Database Manually
      • 14.1.3. Changing the Cluster Configuration Using Save and Restore
    • 14.2. Scheduling Automated Snapshots
    • 14.3. Tuning the Snapshot Process
    • 14.4. Managing Snapshot Files
    • 14.5. Special Notes Concerning Save and Restore
  • 15. Command Logging and Recovery▶
    • 15.1. How Command Logging Works
    • 15.2. Controlling Command Logging
    • 15.3. Configuring Command Logging for Optimal Performance
      • 15.3.1. Log Size
      • 15.3.2. Log Frequency
      • 15.3.3. Synchronous vs. Asynchronous Logging
      • 15.3.4. Hardware Considerations
  • 16. Streaming Data: Import, Export, and Migration▶
    • 16.1. How Data Streaming Works in VoltDB
      • 16.1.1. Understanding Import
      • 16.1.2. Understanding Export
      • 16.1.3. Understanding Migration
    • 16.2. The Business Case for Streaming Data
      • 16.2.1. Extract, Transform, Load (ETL)
      • 16.2.2. Change Data Capture
      • 16.2.3. Streaming Data Validation
      • 16.2.4. Caching
      • 16.2.5. Archiving
    • 16.3. VoltDB Export Connectors
      • 16.3.1. How Export Works
      • 16.3.2. The File Export Connector
      • 16.3.3. The HTTP Export Connector
      • 16.3.4. The JDBC Export Connector
      • 16.3.5. The Kafka Export Connector
      • 16.3.6. The Elasticsearch Export Connector
    • 16.4. VoltDB Import Connectors
      • 16.4.1. Bulk Loading Data Using VoltDB Standalone Utilities
      • 16.4.2. Streaming Import Using Built-in Import Features
      • 16.4.3. The Kafka Importer
    • 16.5. VoltDB Import Formatters
  • A. Supported SQL DDL Statements▶
    • ALTER STREAM
    • ALTER TABLE
    • ALTER TASK
    • ALTER VIEW
    • CREATE INDEX
    • CREATE PROCEDURE AS
    • CREATE PROCEDURE FROM CLASS
    • CREATE ROLE
    • CREATE STREAM
    • CREATE TABLE
    • CREATE TASK
    • CREATE VIEW
    • DR TABLE
    • DROP INDEX
    • DROP PROCEDURE
    • DROP ROLE
    • DROP STREAM
    • DROP TABLE
    • DROP TASK
    • DROP VIEW
    • PARTITION TABLE
  • B. Supported SQL Statements▶
    • DELETE
    • INSERT
    • MIGRATE
    • SELECT
    • TRUNCATE TABLE
    • UPDATE
    • UPSERT
  • C. SQL Functions▶
    • ABS()
    • APPROX_COUNT_DISTINCT()
    • AREA()
    • ARRAY_ELEMENT()
    • ARRAY_LENGTH()
    • ASTEXT()
    • AVG()
    • BIN()
    • BIT_SHIFT_LEFT()
    • BIT_SHIFT_RIGHT()
    • BITAND()
    • BITNOT()
    • BITOR()
    • BITXOR()
    • CAST()
    • CEILING()
    • CENTROID()
    • CHAR()
    • CHAR_LENGTH()
    • COALESCE()
    • CONCAT()
    • CONTAINS()
    • COS()
    • COT()
    • COUNT()
    • CSC()
    • CURRENT_DATE()
    • CURRENT_TIMESTAMP()
    • DATEADD()
    • DATEDIFF()
    • DAY(), DAYOFMONTH()
    • DAYOFWEEK()
    • DAYOFYEAR()
    • DECODE()
    • DEGREES()
    • DISTANCE()
    • DWITHIN()
    • EXP()
    • EXTRACT()
    • FIELD()
    • FLOOR()
    • FORMAT()
    • FORMAT_CURRENCY()
    • FORMAT_TIMESTAMP()
    • FROM_UNIXTIME()
    • HEX()
    • HOUR()
    • INET6_ATON()
    • INET6_NTOA()
    • INET_ATON()
    • INET_NTOA()
    • ISINVALIDREASON()
    • ISVALID()
    • IS_VALID_TIMESTAMP()
    • LATITUDE()
    • LEFT()
    • LN(), LOG()
    • LOG10()
    • LONGITUDE()
    • LOWER()
    • MAKEVALIDPOLYGON()
    • MASK_CCN()
    • MASK_EMAIL()
    • MASK_INNER()
    • MASK_OUTER()
    • MASK_PAN()
    • MASK_PAN_RELAXED()
    • MASK_PARTIAL()
    • MASK_TEXT()
    • MAX()
    • MAX_VALID_TIMESTAMP()
    • MIGRATING()
    • MIN()
    • MIN_VALID_TIMESTAMP()
    • MINUTE()
    • MOD()
    • MONTH()
    • NOW()
    • NUMINTERIORRINGS()
    • NUMPOINTS()
    • OCTET_LENGTH()
    • OVERLAY()
    • PI()
    • POINTFROMTEXT()
    • POLYGONFROMTEXT()
    • POSITION()
    • POWER()
    • QUARTER()
    • RADIANS()
    • REGEXP_POSITION()
    • REPEAT()
    • REPLACE()
    • RIGHT()
    • ROUND()
    • SEC()
    • SECOND()
    • SET_FIELD()
    • SIGN()
    • SIN()
    • SINCE_EPOCH()
    • SPACE()
    • SQRT()
    • STR()
    • SUBSTRING()
    • SUM()
    • TAN()
    • TIME_WINDOW()
    • TO_TIMESTAMP()
    • TRIM()
    • TRUNCATE()
    • UPPER()
    • VALIDPOLYGONFROMTEXT()
    • WEEK(), WEEKOFYEAR()
    • WEEKDAY()
    • YEAR()
  • D. VoltDB CLI Commands▶
    • csvloader
    • jdbcloader
    • kafkaloader
    • sqlcmd
    • voltadmin
    • voltdb
  • E. YAML Configuration Properties▶
    • E.1. Understanding YAML Syntax
      • E.1.1. YAML Files
      • E.1.2. Dot Notation
    • E.2. YAML Properties for Configuring Volt Databases on Bare Metal
  • F. VoltDB Datatype Compatibility▶
    • F.1. Java and VoltDB Datatype Compatibility
  • G. System Procedures▶
    • @AdHoc
    • @AdjustLogging
    • @Explain
    • @ExplainProc
    • @ExplainView
    • @GetPartitionKeys
    • @GetYamlConfiguration
    • @Metrics
    • @Note
    • @Pause
    • @Ping
    • @Quiesce
    • @Resume
    • @SetYamlConfiguration
    • @Shutdown
    • @SnapshotDelete
    • @SnapshotRestore
    • @SnapshotSave
    • @SnapshotScan
    • @Statistics
    • @StopNode
    • @SwapTables
    • @SystemCatalog
    • @SystemInformation
    • @UpdateClasses
    • @UpdateLogging

voltdb

voltdb — Performs management tasks on the current server, such as starting and recovering the database.

Synopsis

voltdb collect [args]

voltdb get classes [args]

voltdb get deployment [args]

voltdb get schema [args]

voltdb mask [args] source-configuration-file [new-configuration-file]

voltdb init [args]

voltdb start [args]

Description

The voltdb command performs local management functions on the current system, including:

  • Initializing the database root directory and setting configuration options

  • Starting the database process

  • Collecting log files into a single compressed file

  • Retrieving the classes, deployment, or schema from a database root directory

  • Hiding passwords in the configuration file

The action that is performed depends on which start action you specify to the voltdb command:

  • collect — the collect option collects system and process logs related to the VoltDB database process on the current system and compresses them into a single file. This command is helpful when reporting problems to VoltDB support.

  • get — the get option retrieves the current configuration, procedure classes, or schema from the database root directory. The requested item is then written to a file. This command can be used whether the database is running or not. You can use options to specify either or both the parent of the root directory (--dir) or the name and location of the output file (--output). Note that the get option can only be used on databases created using init and start.

  • mask — the mask option disguises the passwords associated with user accounts in the security section of the configuration file. The output of the voltdb mask command is either a new configuration file with hashed passwords or, if you do not specify an output file, the original input file is modified in place.

  • init — the init option initializes the root directory VoltDB uses for storing the configuration, logs, and other disk-based information (such as snapshots and command logs) for the database process. You only need to initialize the root directory once. After that, VoltDB manages the content and selecting the appropriate start actions to maintain the database state. If you choose to re-initialize an existing root directory, you can use the --force argument to delete any previous data.[]

  • start — the starts option starts the database process after the root directory has been initialized. The actual action that VoltDB takes depends on the current state of the database cluster:

    • If this is the first time the database has started, it creates a new database.

    • If the database has run before and is configured to use command logs or there is at least one snapshot in the snapshots directory, the database is restarted and previous data recovered.

    • If the cluster is already running and a server is missing (assuming the use of K-safety) the current node will rejoin the running cluster.

    • If the cluster is already running with all servers present, the current node will be added to expand the size of the cluster — as long as you use the --add argument on the start command.

The voltdb start command uses Java to instantiate the process. It is possible to customize the Java environment, if necessary, by passing command line arguments to Java through the following environment variables:

  • LOG4J_VOLTSERVER_PATH — Specifies an alternate Log4J configuration file.

  • VOLTDB_GC_OPTS — Lets you specify which Java garbage collector to use and other GC-related options. Specify the options using standard Java -XX format. For example:

    export VOLTDB_GC_OPTS="-XX+useG1GC -XX+UseStringDeduplication"
  • VOLTDB_HEAPMAX — Specifies the maximum heap size for the Java process. Specify the value as an integer number of megabytes. By default, the maximum heap size is set to 2048.

  • VOLTDB_OPTS — Specifies all other Java command line arguments. You must include both the command line flag and argument. For example, this environment variable can be used to specify system properties using the -D flag:

    export VOLTDB_OPTS="-DmyApp.DebugFlag=true"

Log Collection (voltdb collect) Arguments

The following arguments apply specifically to the collect action.

-D --dir={directory}

Specifies the parent location for the database root directory from which to collect information. The default, if you do not specify a directory, is the current working directory.

--days={integer}

Specifies the number of days of log files to collect. For example, using --days=1 will collect data from the last 24 hours. By default, VoltDB collects 14 days (2 weeks) worth of logs.

--dry-run

Lists the actions that will be taken, including the files that will be collected, but does not actually perform the collection or upload.

--no-prompt

Specifies that the process will not prompt for input, such as whether to delete the output file after uploading is complete. This argument is useful when starting the collect action from within a script.

--output={file}

Specifies the name and location of the resulting output file. The default output file name starts with "voltdb_collect_" and includes the current server IP or hostname, with a file extension of ".zip" saved to the current working directory.

--skip-heap-dump

This qualifier is included for backwards compatibility only and has no effect on the voltdb collect command. Heap dumps are excluded by default.

Get Resource (voltdb get) Arguments

The following arguments apply specifically to the get classes, get deployment, and get schema actions.

-D --dir={directory}

Specifies the parent location for the database root directory. The default, if you do not specify a directory, is the current working directory.

-f, --force

Allows the command to overwrite an existing file. By default, the get actions will not overwrite existing files.

-o --output={file-path}

Specifies the name and, optionally, location for the resulting output file. The default location is the current working directory. The default file depends on the resource being requested:

  • procedures.jar for get classes

  • deployment.yaml for get deployment

  • schema.sql for get schema

In addition, the following arguments are specific to get deployment and are mutually exclusive:

--xml

Specifies that the output be in XML format.

--yaml

Specifies that the output be in YAML format.

If neither the --xml or --yaml argument is specified, the default output format is YAML. However, if the format is not specified but the output file is and the specified file has ".xml" as its file type, the output is generated as XML.

Initialization (voltdb init) Arguments

The following arguments apply to the voltdb init command.

-C, --config={configuration-file}[,...]

Specifies the location of one or more database configuration files. The configuration files are YAML files that define the logical structure of the database , including which options to enable when the database starts. See Appendix E, YAML Configuration Properties for a complete description of the syntax of the configuration file. Use of YAML properties is recommended. However, you can specify a single XML file as an alternative method for specifying the configuration.

If you do not specify a configuration file, default is a configuration that includes command logging (where available), no K-safety, and eight sites per host.

-D --dir={directory}

Specifies the parent location for the database root directory. The root directory is named voltdbroot and is created if it does not already exist in the specified location. If a voltdbroot directory does already exist, you must use the --force argument to override any existing data. The default, if you do not specify a directory, is the current working directory.

-f, --force

Initializes the database root directory, even if files (such as command logs or snapshots) already exist in the specified directory. Initializing the root directory after previously running a database could overwrite and therefore erase old command logs. Therefore, VoltDB will not, by default, initialize the database if such files exist. If you do not need the files from the previous session, you can use the --force argument to overwrite these files.

-j, --classes={JAR-file} [, ...]

Specifies the location of one or more JAR files containing classes used to declare user-defined stored procedures. The JAR files (and any schema definitions included with the --schema argument) are loaded automatically when the database starts. Separate multiple file names with commas. You can also use asterisk (*) as a wildcard character in the file specification. If durability is enabled (through command logs or a shutdown snapshot) the classes specified on the init command are loaded only the first time the database starts and the command logs are used for subsequent starts. If no durability is provided, the initialized classes are loaded on every start.

-l, --license={license-file}

Specifies the location of the license file, which is required. If no license is specified, Volt looks for a file named license.xml in the current working directory, the /voltdb subfolder where the VoltDB software is installed, or the current user's home directory.

-r, --retain={integer}

Specifies the maximum number of snapshot directories to save when performing a voltdb init --force. When initializing a root directory with --force, VoltDB deletes all previous files in the directory except the snapshot subfolder, which is renamed snapshots.1, snapshots.2, and so on. By default, VoltDB saves only two older snapshot folders. The --retain argument lets you specify a different maximum number of folders to save.

-s, --schema={schema-file} [, ...]

Specifies the location of one or more files containing database definition language (DDL) statements. The DDL statements (and any classes included with the --classes argument) are loaded automatically when the database starts. Separate multiple file names with commas. You can also use asterisk (*) as a wildcard character in the file specification. If durability is enabled (through command logs or a shutdown snapshot) the schema specified on the init command is loaded only the first time the database starts and the command logs are used for subsequent starts. If no durability is provided, the initialized schema is loaded on every start.

Database Startup (voltdb start) Arguments

The following arguments apply to the voltdb start command.

-D --dir={directory}

Specifies the parent location for the database root directory. This is the same directory specified on the voltdb init command. (You must initialize the root directory before you can start the database.) The default, if you do not specify a directory, is the current working directory.

-H, --host={host-id} [,...]

Specifies the network address of one or more nodes in the database cluster. VoltDB selects one of these nodes to coordinate the start of the database or the adding or rejoining of servers. When starting a database, all nodes must specify the same list of host addresses. Note that once the database starts and the cluster is complete, the role of the host node is complete and all nodes become peers.

When rejoining or adding a server to a running cluster, you can specify any node(s) still in the cluster. The host for an add or rejoin operation does not have to be the same node specified when the database started.

The default if you do not specify a host when creating or recovering the database is localhost. In other words, a single node cluster running on the current system. You must specify a host on the command line when adding or rejoining a node or when starting a cluster.

If the host node is using an internal port other than the default (3021), you must specify the port as part of the host string, in the format host:port.

When used in conjunction with the --missing flag, the first host in the list must be one of the current hosts, not one of the missing nodes.

-c, --count={number-of-nodes}

Specifies the number of nodes in the database cluster.

--add

When joining a running cluster, specifies that the new node can be "added", elastically expanding the size of the cluster. The --add flag only takes affect when a node is joining a complete, running cluster. If the cluster is starting or if a node is missing from a K-safe cluster, the current node will join the cluster as normal. But if the cluster is already running and has its full complement of members, you must specify --add if you want to increase the size of the cluster.

-B, --background

Starts the server process in the background (as a daemon process).

-g, --placement-group={group-name}

Specifies the location of the server. When the K-safety value is greater than zero, VoltDB uses this argument to assist in rack-aware partitioning. The cluster will attempt to place multiple copies of each partition on different nodes to keep them physically as far apart as possible. The physical location is specified by the group-name, which is an alphanumeric name. The names might represent physical servers, racks, switches, or anything meaningful to the user to avoid multiple copies failing at the same time.

To be effective, placement groups must adhere to the following rules:

  • There must be more than one placement group specified for the cluster.

  • The number of nodes must be a multiple of the number of placement groups.

  • The number of placement groups must be a multiple of K+1.

Otherwise, there are no guarantees the partitions will be evenly distributed.

--ignore=thp

For Linux systems, allows the database to start even if the server is configured to use Transparent Huge Pages (THP). THP is a known problem for memory-intense applications like VoltDB. So under normal conditions VoltDB will not start if the use of THP is enabled. This flag allows you to ignore that restriction for test purposes. Do not use this flag on production systems.

--missing={number-of-nodes}

Allows a K-safe cluster to start without the full complement of nodes. This argument specifies how many nodes are missing from the cluster at startup. For example, if the arguments are --count=5 and --missing=2, then the database will start once three nodes join the cluster, assuming those nodes can support at least one copy of each partition. Note that use of the --missing option means that the cluster is not fully K-safe until the specified number of missing nodes rejoin the cluster after the database starts. Also, the --hosts flag should list currently available hosts, not the missing nodes.

--pause

For the create and recover operations only, starts the database in admin mode. Admin mode stops applications from performing write operations to the database through the client interface. This is useful when performing administrative functions such as restoring a snapshot before allowing client access. Once all administrative operations are complete, you can use the voltadmin resume command to resume normal operation for the database. If any nodes in the cluster start with the --pause switch, the entire cluster starts paused.

--safemode

When using command logs to recover an existing database that cannot recover under normal circumstances, the --safemode argument recovers the database to the last valid transaction. This argument should only be used when troubleshooting a failed recovery. See the description of safe mode recovery in the VoltDB Administrator's Guide for details.

Network Configuration Arguments

In addition to the arguments listed above for the voltdb start command, there are additional arguments that specify the network configuration for server ports and interfaces when starting a VoltDB database. In most cases, the default values can and should be accepted for these settings. The exceptions are the external and internal interfaces that should be specified whenever there are multiple network interfaces on a single machine.

You can choose to set network ports and interfaces either using individual arguments for each port or as a YAML file identified by the --network qualifier. When specifying network settings in YAML, you identify the type of port followed by individual properties for the port number and the network interface, either of which can be defaulted. For example, the following YAML network configuration file shows all of the possible settings. Of course, normally you only need to specify those settings that are different from the default.

network:
    externalinterface: 192.168.0.100
    publicinterface: 192.168.0.200
    admin:
        address: 192.168.0.100
        port: 21211
    client:
        address: 192.168.0.100
        port: 21212
    drpublic:
        address: 192.168.0.100
        port: 5555
    internal:
        address: 192.168.0.100
        port: 3021
    metrics:
        address: 192.168.0.100
        port: 11781
    replication:
        address: 192.168.0.100
        port: 5555
    zookeeper:
        address: 127.0.0.1
        port: 7181

When specifying network ports using individual command line arguments, you can optionally specify a unique network interface by preceding the port number with the interface's IP address (or hostname) followed by a colon. Specifying the port and/or network interface for an individual port setting overrides the default interface for that port, the interface set by --externalinterface or --internalinterface, and any properties defined in a YAML file specified using the --network qualifier.

The network configuration arguments to the voltdb start command are listed below. See the appendix on server configuration options in the VoltDB Administrator's Guide for more information about network configuration options.

--network={YAML-file}

Specifies a YAML file that defines the interfaces and port numbers of one or more network ports and interfaces.

--externalinterface={ip-address}

Specifies the default network interface to use for external ports, such as the admin and client ports.

--internalinterface ={ip-address}

Specifies the default network interface to use for internal communication, such as the internal port.

--publicinterface={ip-address}

Specifies the public network interface. This argument is useful for hosted systems where the internal and external interfaces may not be generally reachable from the Internet. In which case, specifying the public interface helps the Volt Management Center provide publicly accessible links for the cluster nodes.

--drpublic={ip-address}[:port-number]

Specifies the publicly advertised network interface and, optionally, port number for database replication (DR) communication. This is the address that is sent from the producer cluster to consumers. This argument is useful for hosted systems where the internal interfaces are not reachable from outside the hosted environment and the producer cluster must return an externally mapped port as the public DR interface to remote consumers.

--admin=[ip-address:]{port-number}

Specifies the admin port.

--client=[ip-address:]{port-number}

Specifies the client port.

--http=[ip-address:]{port-number}

Specifies the http port. The --http flag both sets the port number (and optionally the interface) and enables the http port, overriding the http setting, if any, in the configuration file.

--internal=[ip-address:]{port-number}

Specifies the internal port used to communicate between cluster nodes.

--metrics=[ip-address:]{port-number}

Specifies the metrics port used for distributing Prometheus-compliant metrics data.

--replication=[ip-address:]{port-number}

Specifies the replication port used for database replication. The --replication flag overrides the replication port setting in the configuration.

--zookeeper=[ip-address:]{port-number}

Specifies the zookeeper port. By default, the zookeeper port is bound to the server's internal interface (127.0.0.1).

Examples

The first example shows the commands for initializing and starting a three-node database cluster using three custom configuration files, common.yaml, boston.yaml, and users.yaml — and the node zeus as the host. This example demonstrates how multiple XDCR clusters could share a common set of configuration options, then have unique settings for, say, the XDCR settings (including the cluster-specific ID) and the user accounts for the cluster.

$ voltdb init --dir=~/mydb --config=configuration.yaml,boston.yaml,users.yaml
$ voltdb start --dir=~/mydb --count=3 --host=zeus

The second example takes advantage of the defaults for the host and configuration arguments to initialize and start a single-node database in the current directory.

$ voltdb init
$ voltdb start

The next example shows the use of the --force argument to re-initialize the directory used in the first example, to delete old data and set new configuration options from a different configuration file.

$ voltdb init --dir=~/mydb --config=newconfig.yaml --force


[] The init --force command deletes command logs and overflow subfolders within the database root directory. However, to avoid accidentally deleting backups, the snapshots subfolder is renamed rather than deleted. This way, it is possible to restore a snapshot in case of an unintended re-initialization. On the other hand, this means you should periodically check your database root directories and purge any archived snapshots folders (named snapshots.nn) that are no longer needed.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.