org.apache.flink.contrib.streaming.state.snapshot.RocksIncrementalSnapshotStrategy Java Examples
The following examples show how to use
org.apache.flink.contrib.streaming.state.snapshot.RocksIncrementalSnapshotStrategy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RocksDBKeyedStateBackendBuilder.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
private SnapshotStrategy<K> initializeSavepointAndCheckpointStrategies( CloseableRegistry cancelStreamRegistry, ResourceGuard rocksDBResourceGuard, LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, int keyGroupPrefixBytes, RocksDB db, UUID backendUID, SortedMap<Long, Set<StateHandleID>> materializedSstFiles, long lastCompletedCheckpointId) { RocksDBSnapshotStrategyBase<K> savepointSnapshotStrategy = new RocksFullSnapshotStrategy<>( db, rocksDBResourceGuard, keySerializerProvider.currentSchemaSerializer(), kvStateInformation, keyGroupRange, keyGroupPrefixBytes, localRecoveryConfig, cancelStreamRegistry, keyGroupCompressionDecorator); RocksDBSnapshotStrategyBase<K> checkpointSnapshotStrategy; if (enableIncrementalCheckpointing) { // TODO eventually we might want to separate savepoint and snapshot strategy, i.e. having 2 strategies. checkpointSnapshotStrategy = new RocksIncrementalSnapshotStrategy<>( db, rocksDBResourceGuard, keySerializerProvider.currentSchemaSerializer(), kvStateInformation, keyGroupRange, keyGroupPrefixBytes, localRecoveryConfig, cancelStreamRegistry, instanceBasePath, backendUID, materializedSstFiles, lastCompletedCheckpointId, numberOfTransferingThreads); } else { checkpointSnapshotStrategy = savepointSnapshotStrategy; } return new SnapshotStrategy<>(checkpointSnapshotStrategy, savepointSnapshotStrategy); }
Example #2
Source File: RocksDBKeyedStateBackendBuilder.java From flink with Apache License 2.0 | 4 votes |
private SnapshotStrategy<K> initializeSavepointAndCheckpointStrategies( CloseableRegistry cancelStreamRegistry, ResourceGuard rocksDBResourceGuard, LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, int keyGroupPrefixBytes, RocksDB db, UUID backendUID, SortedMap<Long, Set<StateHandleID>> materializedSstFiles, long lastCompletedCheckpointId) { RocksDBSnapshotStrategyBase<K> savepointSnapshotStrategy = new RocksFullSnapshotStrategy<>( db, rocksDBResourceGuard, keySerializerProvider.currentSchemaSerializer(), kvStateInformation, keyGroupRange, keyGroupPrefixBytes, localRecoveryConfig, cancelStreamRegistry, keyGroupCompressionDecorator); RocksDBSnapshotStrategyBase<K> checkpointSnapshotStrategy; if (enableIncrementalCheckpointing) { // TODO eventually we might want to separate savepoint and snapshot strategy, i.e. having 2 strategies. checkpointSnapshotStrategy = new RocksIncrementalSnapshotStrategy<>( db, rocksDBResourceGuard, keySerializerProvider.currentSchemaSerializer(), kvStateInformation, keyGroupRange, keyGroupPrefixBytes, localRecoveryConfig, cancelStreamRegistry, instanceBasePath, backendUID, materializedSstFiles, lastCompletedCheckpointId, numberOfTransferingThreads); } else { checkpointSnapshotStrategy = savepointSnapshotStrategy; } return new SnapshotStrategy<>(checkpointSnapshotStrategy, savepointSnapshotStrategy); }
Example #3
Source File: RocksDBKeyedStateBackendBuilder.java From flink with Apache License 2.0 | 4 votes |
private SnapshotStrategy<K> initializeSavepointAndCheckpointStrategies( CloseableRegistry cancelStreamRegistry, ResourceGuard rocksDBResourceGuard, LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, int keyGroupPrefixBytes, RocksDB db, UUID backendUID, SortedMap<Long, Set<StateHandleID>> materializedSstFiles, long lastCompletedCheckpointId) { RocksDBSnapshotStrategyBase<K> savepointSnapshotStrategy = new RocksFullSnapshotStrategy<>( db, rocksDBResourceGuard, keySerializerProvider.currentSchemaSerializer(), kvStateInformation, keyGroupRange, keyGroupPrefixBytes, localRecoveryConfig, cancelStreamRegistry, keyGroupCompressionDecorator); RocksDBSnapshotStrategyBase<K> checkpointSnapshotStrategy; if (enableIncrementalCheckpointing) { // TODO eventually we might want to separate savepoint and snapshot strategy, i.e. having 2 strategies. checkpointSnapshotStrategy = new RocksIncrementalSnapshotStrategy<>( db, rocksDBResourceGuard, keySerializerProvider.currentSchemaSerializer(), kvStateInformation, keyGroupRange, keyGroupPrefixBytes, localRecoveryConfig, cancelStreamRegistry, instanceBasePath, backendUID, materializedSstFiles, lastCompletedCheckpointId, numberOfTransferingThreads); } else { checkpointSnapshotStrategy = savepointSnapshotStrategy; } return new SnapshotStrategy<>(checkpointSnapshotStrategy, savepointSnapshotStrategy); }