常用 vkconfig 脚本选项

可以在 vkconfig 脚本中提供的不同工具中找到这些选项。

--conffilename
包含 vkconfig 脚本配置选项的文本文件。请参阅下面的配置文件格式
--config-schemaschema_name
调度程序的 Vertica 架构的名称。此值与调度程序的名称相同。可以在配置期间使用此名称标识调度程序。

默认值:

stream_config

--dbhosthost name
充当调度程序启动程序节点的 Vertica 节点的主机名或 IP 地址。

默认值:

localhost

--dbport port_number
用于连接到 Vertica 数据库的端口。

默认值:

5433

--enable-ssl
支持 vkconfig 脚本使用 SSL 连接到 Vertica 或在 Vertica 与 Kafka 之间使用 SSL。有关详细信息,请参阅为调度程序配置 TLS 连接
--help
列显帮助菜单,其中会列出可用选项及其描述。
--jdbc-optoption=value [&option2=value2...]
一个或多个要添加到 vkconfig 用于连接到 Vertica 的标准 JDBC URL 的选项。不能与 --jdbc-url 配合使用。
--jdbc-urlurl
vkconfig 用于连接到 Vertica 的完整 JDBC URL,而不是标准 JDBC URL 字符串。
--passwordpassword
数据库用户的密码。
--ssl-ca-aliasalias_name
信任库中根证书颁发机构的别名。设置后,调度程序将仅加载与指定别名关联的证书。忽略后,调度程序会将所有证书都加载到信任库中。
--ssl-key-aliasalias_name
密钥库中密钥和证书对的别名。Vertica 使用 SSL 连接到 Kafka 时必须设置该别名。
--ssl-key-passwordpassword
SSL 密钥的密码。Vertica 使用 SSL 连接到 Kafka 时必须设置该别名。
--usernameusername
用于修改调度程序配置的 Vertica 数据库用户。此用户必须对调度程序的架构具有创建权限。

默认值:

当前用户

--version
显示调度程序的版本号。

配置文件格式

您可以使用配置文件来存储在调用 vkconfig 实用程序时使用的常用参数。配置文件是文本文件,每行包含一个选项设置,格式如下:

option=value

此外,还可以在选项文件中添加注释,方法是在注释前加上井号 (#) 前缀。

#config.properties:
username=myuser
password=mypassword
dbhost=localhost
dbport=5433

可以使用 --conf 选项告知 vkconfig 使用配置文件:

$ /opt/vertica/packages/kafka/bin/vkconfig source --update --conf config.properties

您可以从命令行覆盖所有已存储的参数:

$ /opt/vertica/packages/kafka/bin/vkconfig source --update --conf config.properties --dbhost otherVerticaHost

示例

以下示例显示如何使用共享的实用程序选项。

显示调度程序实用程序的帮助:

$ vkconfig scheduler --help
This command configures a Scheduler, which can run and load data from configured
sources and clusters into Vertica tables. It provides options for changing the
'frame duration' (time given per set of batches to resolve), as well as the
dedicated Vertica resource pool the Scheduler will use while running.

Available Options:
PARAMETER               #ARGS    DESCRIPTION
conf                    1        Allow the use of a properties file to associate
                                 parameter keys and values. This file enables
                                 command string reuse and cleaner command strings.
help                    0        Outputs a help context for the given subutility.
version                 0        Outputs the current Version of the scheduer.
skip-validation         0        [Depricated] Use --validation-type.
validation-type         1        Determine what happens when there are
                                 configuration errors. Accepts: ERROR - errors
                                 out, WARN - prints out a message and continues,
                                 SKIP - skip running validations
dbhost                  1        The Vertica database hostname that contains
                                 metadata and configuration information. The
                                 default value is 'localhost'.
dbport                  1        The port at the hostname to connect to the
                                 Vertica database. The default value is '5433'.
username                1        The user to connect to Vertica. The default
                                 value is the current system user.
password                1        The password for the user connecting to Vertica.
                                 The default value is empty.
jdbc-url                1        A JDBC URL that can override Vertica connection
                                 parameters and provide additional JDBC options.
jdbc-opt                1        Options to add to the JDBC URL used to connect
                                 to Vertica ('&'-separated key=value list).
                                 Used with generated URL (i.e. not with
                                 '--jdbc-url' set).
enable-ssl              1        Enable SSL between JDBC and Vertica and/or
                                 Vertica and Kafka.
ssl-ca-alias            1        The alias of the root CA within the provided
                                 truststore used when connecting between
                                 Vertica and Kafka.
ssl-key-alias           1        The alias of the key and certificate pair
                                 within the provided keystore used when
                                 connecting between Vertica and Kafka.
ssl-key-password        1        The password for the key used when connecting
                                 between Vertica and Kafka. Should be hidden
                                 with file access (see --conf).
config-schema           1        The schema containing the configuration details
                                 to be used, created or edited. This parameter
                                 defines the scheduler. The default value is
                                 'stream_config'.
create                  0        Create a new instance of the supplied type.
read                    0        Read an instance of the supplied type.
update                  0        Update an instance of the supplied type.
delete                  0        Delete an instance of the supplied type.
drop                    0        Drops the specified configuration schema.
                                 CAUTION: this command will completely delete
                                 and remove all configuration and monitoring
                                 data for the specified scheduler.
dump                    0        Dump the config schema query string used to
                                 answer this command in the output.
operator                1        Specifies a user designated as an operator for
                                 the created configuration. Used with --create.
add-operator            1        Add a user designated as an operator for the
                                 specified configuration. Used with --update.
remove-operator         1        Removes a user designated as an operator for
                                 the specified configuration. Used with
                                 --update.
upgrade                 0        Upgrade the current scheduler configuration
                                 schema to the current version of this
                                 scheduler. WARNING: if upgrading between
                                 EXCAVATOR and FRONTLOADER be aware that the
                                 Scheduler is not backwards compatible. The
                                 upgrade procedure will translate your kafka
                                 model into the new stream model.
upgrade-to-schema       1        Used with upgrade: will upgrade the
                                 configuration to a new given schema instead of
                                 upgrading within the same schema.
fix-config              0        Attempts to fix the configuration (ex: dropped
                                 tables) before doing any other updates. Used
                                 with --update.
frame-duration          1        The duration of the Scheduler's frame, in
                                 which every configured Microbatch runs. Default
                                 is 300 seconds: '00:05:00'
resource-pool           1        The Vertica resource pool to run the Scheduler
                                 on. Default is 'general'.
config-refresh          1        The interval of time between Scheduler
                                 configuration refreshes. Default is 5 minutes:
                                 '00:05'
new-source-policy       1        The policy for new Sources to be scheduled
                                 during a frame. Options are: START, END, and
                                 FAIR. Default is 'FAIR'.
pushback-policy         1
pushback-max-count      1
auto-sync               1        Automatically update configuration based on
                                 metadata from the Kafka cluster
consumer-group-id       1        The Kafka consumer group id to report offsets
                                 to.
eof-timeout-ms          1        [DEPRECATED] This option has no effect.