Starting OmniStateStore
This section describes how to start the OmniStateStore service to enable the acceleration function of Flink state storage.
- Set the configuration items in the flink-conf.yaml file located in the Flink conf directory based on the service requirements and deployment environment.
Configuration item format: ${Configuration item name} + ${Colon} + ${Space} + ${Configuration item value}. Configuration Items describes the configuration items. The following describes the configuration items in different scenarios.
- Add or modify the following configuration items in ${FLINK_HOME}/conf/flink-conf.yaml to enable OmniStateStore. Update the configuration files of the Job Manager and all Task Managers.
Table 1 Configuration items Configuration Item
Description
Example
Remarks
state.backend
Open-source Flink parameter, which is used to configure the state backend.
com.huawei.ock.bss.OckDBStateBackendFactory
This configuration item determines the state backend type. Verify that the value is case-sensitive and correctly spelled.
state.backend.ockdb.localdir
Local OmniStateStore state data path.
/usr/local/flink/ockdb
Check that the path exists and the Flink run user has the read and write permissions on the path.
state.backend.ockdb.jni.logfile
OmniStateStore log path.
/usr/local/flink/log/kv.log
The Flink log path is recommended for this path.
A configuration example is as follows:
state.backend: com.huawei.ock.bss.OckDBStateBackendFactory state.backend.ockdb.localdir: /usr/local/flink/ockdb state.backend.ockdb.jni.logfile: /usr/local/flink/log/kv.log
- Add or modify the following configuration items in ${FLINK_HOME}/conf/flink-conf.yaml to enable OmniStateStore. Update the configuration files of the Job Manager and all Task Managers.
- Create the necessary directories.In the example, state.backend.ockdb.localdir is set to /usr/local/flink/ockdb and state.backend.ockdb.checkpoint.backup is set to /usr/local/flink/checkpoint/backup. Replace the example directories with the actual directories used in your installation.
mkdir -p /usr/local/flink/ockdb mkdir -p /usr/local/flink/checkpoint/backup
- Start a Flink task and view the configuration items in the log to check whether the configuration is successful.
- Run the ${FLINK_HOME}/examples/streaming/WordCount.jar demo application.
If "OmniStateStore service start success" is displayed in the Task Manager logs, OmniStateStore is started successfully.