@GetYamlConfiguration

Documentation

VoltDB Home » Documentation » Using VoltDB

@GetYamlConfiguration

@GetYamlConfiguration — Returns current configuration settings for one or more properties

Synopsis

@GetYamlConfiguration String property-list

Description

The @GetYamlConfiguration system procedure returns the current values for one or more configuration properties as a text string in YAML format. You specify the properties in dot notation, separating multiple properties on individual lines. For example, the following input argument would return the current values for deployment.cluster.sitesperhost, deployment.cluster.kfactor, and deployment.snapshot:

deployment.cluster.sitesperhost
deployment.cluster.kfactor
deployment.snapshot

In the case of complex properties — those where the value is an array or sequence of subproperties, like deployment.snapshot in the preceding example — the results include all of the subproperties. For example, the preceding input would result in the following output on a database started with the default configuration:

---
deployment:
  cluster:
    sitesperhost: 8
    kfactor: 0
  snapshot:
    frequency: "24h"
    retain: 2
    prefix: "AUTOSNAP"
    enabled: false

Specifying an empty string or the string "null" as the input argument returns all of the configuration properties.

Return Values

Returns a string containing the YAML representation of the property or properties requested.

Examples

The following program example uses @GetYamlConfiguration to retrieve all import and export configuration settings.

try {
    VoltTable[] results = client.callProcedure("@GetYamlConfiguration",
       "deployment.import\ndeployment.export").getResults();
    String yamloutput = results[0].fetchRow(0).getString(0));
}
catch (Exception e) {
    e.printStackTrace();
}

For interactive use, the voltadmin get command performs the same function as @GetYamlConfiguration, except you separate multiple property names with spaces instead of line breaks. For example, the following is the interactive equivalent of the preceding program example:

$ voltadmin get deployment.import deployment.export