Appendix A. Configuration File (deployment.xml)

Documentation

VoltDB Home » Documentation » Upgrade Guide

Appendix A. Configuration File (deployment.xml)

Vote Active Data V14 introduced the use of YAML for configuring the database. Use of XML for configuration is now deprecated. However, to ensure a smooth transition for existing databases, XML configuration files are still accepted as input for the voltadmin init and update commands. This appendix describes the syntax for XML configuration files.

A.1. Understanding XML Syntax

XML files consist of a series of nested elements identified by beginning and ending "tags". The beginning tag is the element name enclosed in angle brackets and the ending tag is the same except that the element name is preceded by a slash. For example:

<deployment>
   <cluster>
   </cluster>
</deployment>

Elements can be nested. In the preceding example cluster is a child of the element deployment.

Elements can also have attributes that are specified within the starting tag by the attribute name, an equals sign, and its value enclosed in single or double quotes. In the following example the kfactor and sitesperhost attributes of the cluster element are assigned values of "1" and "12", respectively.

<deployment>
   <cluster kfactor="1" sitesperhost="12">
   </cluster>
</deployment>

Finally, as a shorthand, elements that do not contain any children can be entered without an ending tag by adding the slash to the end of the initial tag. In the following example, the cluster and heartbeat tags use this form of shorthand:

<deployment>
   <cluster kfactor="1" sitesperhost="12"/>
   <heartbeat timeout="10"/>
</deployment>

For complete information about the XML standard and XML syntax, see the official XML site at http://www.w3.org/XML/.