- class RocksDBStateBackend(checkpoint_data_uri=None, enable_incremental_checkpointing=None, checkpoint_stream_backend=None, j_rocks_db_state_backend=None)[source]#
IMPORTANT RocksDBStateBackend is deprecated in favor of EmbeddedRocksDBStateBackend and FileSystemCheckpointStorage. This change does not affect the runtime characteristics of your Jobs and is simply an API change to help better communicate the ways Flink separates local state storage from fault tolerance. Jobs can be upgraded without loss of state. If configuring your state backend via the StreamExecutionEnvironment please make the following changes.
>> env.set_state_backend(EmbeddedRocksDBStateBackend()) >> env.get_checkpoint_config().set_checkpoint_storage("hdfs://checkpoints")
If you are configuring your state backend via the flink-conf.yaml no changes are required.
A State Backend that stores its state in
RocksDB. This state backend can store very large state that exceeds memory and spills to disk.
All key/value state (including windows) is stored in the key/value index of RocksDB. For persistence against loss of machines, checkpoints take a snapshot of the RocksDB database, and persist that snapshot in a file system (by default) or another configurable state backend.
The behavior of the RocksDB instances can be parametrized by setting RocksDB Options using the methods
Gets the state backend that this RocksDB state backend uses to persist its bytes to.
Gets the configured local DB storage paths, or null, if none were configured.
Gets the number of threads used to transfer files while snapshotting/restoring.
Gets the fully-qualified class name of the options factory in Java that lazily creates the RocksDB options.
Gets the current predefined options for RocksDB.
Gets whether incremental checkpoints are enabled for this state backend.
Sets the directories in which the local RocksDB database puts its files (like SST and metadata files).
Sets the number of threads used to transfer files while snapshotting/restoring.
org.rocksdb.Optionsfor the RocksDB instances.
Sets the predefined options for RocksDB.