dhconfig dis

The dis configuration data type of the dhconfig tool is used to work with Data Import Server (DIS) configurations. The main data routing configuration file includes a section called dataImportServers, which defines DIS (Data Import Server) configurations. For more details, see the documentation for dhconfig routing and the Data routing YAML format. This command manages DIS configurations directly, separate from the main configuration. This method is much more convenient than editing the data routing configuration for most additional DIS configurations. A DIS may be configured either in the main routing configuration, or separately using this command.

Note

The authenticated user must be in a group authorized to make data routing service changes. The superusers group (iris-superusers by default) always has write permission. Additional groups can be given permission with the following property, which must be visible to the configuration server:

DataRoutingService.writers=group1,group2

Usage:

dhconfig dis [import|add|export|list|delete|validate|show-claims|help] [arguments]

As with other dhconfig configuration data types, the --help argument provides detailed information on the available actions and arguments, as well as usage examples. Use --help whenever you need more information about the available options. For example, if you want information about the import action, you can run:

dhconfig dis import --help

Which prints the following:

usage: dhconfig dis import [-c] [--configfile <arg>] [--diskprops] [--etcd] [-f <arg>] [-force] [-h] [-ignore] [-k <arg>
       | -user <arg>] [-pf <arg>] [-r <arg>]  [-v]
Import data import server configurations.

...followed by a description of all of the subcommand's options and some usage examples.

Due to the number of available options and combinations, and the robust in-tool documentation via --help, an exhaustive list of all possible commands is not provided here. Instead, we will elaborate on some of the more complex arguments below, and then give some usage examples. We recommend that you use the --help argument as needed for more information.

Note

Many Deephaven processes respond dynamically to data routing configuration changes.

Note

DIS (Data Import Server) names that are configured separately — outside of the main data routing configuration file — must follow stricter naming rules. For best compatibility, use only letters, numbers, underscores, and dashes in DIS names, and avoid special characters.

dis subcommands

The following subcommands are supported for dhconfig dis:

Note

Bypassing configuration server with --etcd: When you use the --etcd option, dhconfig connects directly to the etcd database, skipping the Configuration Server. This should only be done by administrators with the necessary permissions and is typically used for troubleshooting or recovery when the Configuration Server is unavailable.

export

Prints or exports the data import server configurations in the system.

ArgumentDescription
--directoryspecify the directory for writing files. If specified, data import server configurations are written to individual files in this directory.
--fileexport the specified configurations to this filename. Optional, defaults to stdout.
--ignore-errorsExport the configuration(s) even when there are parsing errors in the stored configurations. Only valid with --etcd.
--allInclude core data import server configurations in the export. WARNING: This creates a configuration that cannot be imported without editing the main data routing file.

Usage examples:

Print separately configured data import servers:

dhconfig dis export

Export all separately configured data import servers to a single file:

dhconfig dis export --file /tmp/import_servers.yml

Export all separately configured data import servers to individual files (the directory must exist):

dhconfig dis export --directory /tmp/dises

Export a data import server configuration that is defined in the routing file. All anchors are resolved, and the file is suitable for import:

dhconfig dis export --name disname --file /tmp/disname.yml --all

import

Loads one or more DIS configurations from a file or files. See the configuration generated by the export command to see the format. If the file contains multiple configurations, they must be separated by --- lines, for example:

---
#DIS configuration 1
dis1:
  endpoint:
    serviceRegistry: registry
  claims:
    - namespace: namespace1
  storage: private

---
dis2:
  endpoint:
    serviceRegistry: registry
  claims:
    - namespace: namespace2
  storage: private

--- is a standard YAML convention for delimiting multiple documents within a single file.

ArgumentDescription
--forceImport the data import servers even if configurations with the same names already exist.
--clobberDelete all existing data import server configurations, and replace them with the set given in this command.
--ignore-errorsWith --clobber, set the configuration even if the existing or new configuration has errors. Use with extreme caution.
--routing-file <arg>With --clobber, include the given routing file along with the data import server configurations.
--fileInput file(s) to import. It may be included multiple times in most contexts. Trailing arguments are treated as --file arguments.

Usage examples:

Note

Import actions require authentication, with sudo, --key, or --user.

Import data import server configuration(s) from /tmp/import_servers.yml:

dhconfig dis import --file /tmp/import_servers.yml

Import data import server configuration from files in /tmp/import_servers:

dhconfig dis import /tmp/import_servers/*.yml

Import data routing configuration from /tmp/import_servers.yml, bypassing configuration server (requires sudo):

dhconfig dis import --file /tmp/import_servers.yml --etcd

Replace the set of data import server configurations with those in file /tmp/import_servers.yml (requires sudo): This can be used to repair an invalid configuration.

dhconfig dis import /tmp/import_servers.yml --clobber --etcd

Replace the entire data routing configuration with the data routing file /tmp/routing.yml and set of data import server configurations from the file in /tmp/import_servers.yml:
This can be used to repair an invalid configuration.

dhconfig dis import --clobber --routing-file /tmp/routing.yml --file /tmp/import_servers.yml --etcd --ignore-errors

To avoid more complicated errors arising from a damaged configuration, bypass validation and the Configuration Server:

Warning

Use with extreme caution because this can create an invalid configuration.

dhconfig dis import --clobber --routing-file /tmp/routing.yml --file /tmp/import_servers.yml --etcd --ignore-errors

add

Defines and adds a new DIS configuration.

ArgumentDescription
--name <arg>The name of a data import server configuration to add.
--claim <arg>Claim the specified namespace or namespace.tableName for this import server. It may be specified multiple times.
--forceAdd the data import server even if a configuration with this name already exists.

Usage examples:

Note

add actions require authentication with sudo, --key, or --user.

Define and import a data import server configuration claiming several namespaces:

dhconfig dis add --name dis_for_AAA --claim AAA1 --claim AAA2

Define and import a data import server configuration claiming several tables:

dhconfig dis add --name dis_for_BBB --claim Namespace1.BBB --claim Namespace2.BBB

list

Lists the data import server configurations in the system.

ArgumentDescription
--allList all data import server configurations, including core configurations.
--longInclude claims made by all listed data import servers.

Usage examples:

List separately configured data import servers in routing configuration:

dhconfig dis list

List all configured data import servers in routing configuration (including those defined in the main routing file):

dhconfig dis list --all

delete

Removes one or more data import server configurations from the system.

ArgumentDescription
--forceReally delete the indicated configurations. Required for safety.
--ignore-errorsDelete the configuration(s) even if the existing or new configuration has errors. Use with extreme caution.

Usage examples:

Note

delete actions require authentication, with sudo, --key, or --user.

Delete data import servers from routing configuration:

dhconfig dis delete --name extra_dis --name extra_dis2 --force
dhconfig dis delete extra_dis extra_dis2 --force

validate

Checks a file or files for errors without importing them.

ArgumentDescription
--fileInput file(s) to validate. It may be included multiple times in most contexts. Trailing arguments are treated as --file arguments.
--routing-file <arg>Validate including the given routing file along with the data import server configurations.

Usage examples:

Verify that the files parse, and will not cause errors when added to the routing configuration:

dhconfig dis validate /tmp/disa.yml /tmp/disb.yml
dhconfig dis validate /tmp/dises/*.yml

show-claims

Shows existing data import server claims.

ArgumentDescription
--namespaceInclude only the given namespace(s). Multiple may be set, separated by spaces.
--tableInclude only the given table (requires --namespace).

Usage examples:

Show existing data import server claims:

dhconfig dis show-claims

Show claims for the namespaces AAA, BBB, and CCC:

dhconfig dis show-claims --namespace AAA BBB CCC

Show claims for the table AAA.BBB:

dhconfig dis show-claims --namespace AAA --table BBB