dhconfig routing
The routing (or datarouting or data_routing) configuration data type of the dhconfig tool is used to work with the data routing configuration.
Note
Many Deephaven processes respond dynamically to data routing configuration changes.
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 actions. For example, if you want information about the import action, you can run:
Which prints the following:
A description of all the subcommand's options and some usage examples follows.
Due to the number of available actions and combinations, an exhaustive list of all possible commands is not provided here. Instead, we will give some usage examples and recommend that you use the --help argument as needed for more information.
Examples
export
Print the data routing configuration:
Export data routing configuration to /tmp/routing.yml:
Export the stored data routing configuration even if it contains parsing errors. This writes the raw YAML as stored in etcd, so you can repair it and import it again. --ignore-errors is only allowed with --etcd (requires sudo):
| Argument | Description |
|---|---|
--file <arg> | Name of the file to export to. Optional; defaults to stdout. A trailing argument is treated as the file name. |
--ignore-errors | Export the stored configuration even if it contains parsing errors. Requires --etcd. |
import
Note
Unless you use --etcd, import actions require authentication, with sudo, --key, or --user.
Unless the --etcd option is used, the authenticated user must be in the superusers group (iris-superusers by default) or in a group authorized for data routing service changes via by the DataRoutingService.writers property, which must be visible to the configuration server:
Import data routing configuration from /tmp/routing.yml:
Import data routing configuration from /tmp/routing.yml, bypassing configuration server (requires sudo):
| Argument | Description |
|---|---|
--file <arg> | Name of a file to import/update. Optional; defaults to property DataRoutingService.configFile or routing_service.yml. |
--ignore-errors | Import even when a DIS filter references InternalPartition without handling TableLocationKey.NULL_PARTITION. A file that fails to parse is still rejected. Use with caution. |
Note
A whereLocationKey filter that references InternalPartition must also account for the aggregate-key placeholder (TableLocationKey.NULL_PARTITION), otherwise DIS truncate/delete commands routed through that DIS will be rejected. import and edit will fail unless the filter includes a clause such as InternalPartition == TableLocationKey.NULL_PARTITION || ..., or unless --ignore-errors is supplied. See the whereLocationKey section of the YAML reference for details.
Note
You cannot use dhconfig routing to validate or import both the main routing configuration file and additional, separately managed DIS files in a single command. If you need to work with both at once, use dhconfig dis with the --routing-file option.
To check both together without changing anything, use dis validate:
To import both together, dis import requires --clobber with --routing-file. This replaces all separately managed DIS configurations with only the ones in the given files:
edit
Note
Unless you use --etcd, edit actions require authentication, with sudo, --key, or --user, and the same group membership as import.
Open the current data routing configuration in an editor. After you save and exit, dhconfig asks whether to import the changed file, then validates it as import does. If validation fails, you can edit again, show the full exception, retry ignoring the InternalPartition filter check, or abort. See Editing configuration for more information.
Edit the data routing configuration with a specific editor:
| Argument | Description |
|---|---|
-e,--editor <arg> | The editor to use. Optional; defaults to the EDITOR environment variable, or vi if it is not set. |
--ignore-errors | Save even when a DIS filter references InternalPartition without handling TableLocationKey.NULL_PARTITION. A file that fails to parse is still rejected. Use with caution. |
validate
Check /tmp/routing.yml for errors: