Class RocksDBFullRestoreOperation<K>
- java.lang.Object
-
- org.apache.flink.contrib.streaming.state.restore.RocksDBFullRestoreOperation<K>
-
- All Implemented Interfaces:
AutoCloseable,RocksDBRestoreOperation,org.apache.flink.runtime.state.RestoreOperation<RocksDBRestoreResult>
public class RocksDBFullRestoreOperation<K> extends Object implements RocksDBRestoreOperation
Encapsulates the process of restoring a RocksDB instance from a full snapshot.
-
-
Constructor Summary
Constructors Constructor Description RocksDBFullRestoreOperation(org.apache.flink.runtime.state.KeyGroupRange keyGroupRange, ClassLoader userCodeClassLoader, Map<String,RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, org.apache.flink.runtime.state.StateSerializerProvider<K> keySerializerProvider, File instanceRocksDBPath, org.rocksdb.DBOptions dbOptions, java.util.function.Function<String,org.rocksdb.ColumnFamilyOptions> columnFamilyOptionsFactory, RocksDBNativeMetricOptions nativeMetricOptions, org.apache.flink.metrics.MetricGroup metricGroup, Collection<org.apache.flink.runtime.state.KeyedStateHandle> restoreStateHandles, RocksDbTtlCompactFiltersManager ttlCompactFiltersManager, long writeBatchSize, Long writeBufferManagerCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()RocksDBRestoreResultrestore()Restores all key-groups data that is referenced by the passed state handles.
-
-
-
Constructor Detail
-
RocksDBFullRestoreOperation
public RocksDBFullRestoreOperation(org.apache.flink.runtime.state.KeyGroupRange keyGroupRange, ClassLoader userCodeClassLoader, Map<String,RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, org.apache.flink.runtime.state.StateSerializerProvider<K> keySerializerProvider, File instanceRocksDBPath, org.rocksdb.DBOptions dbOptions, java.util.function.Function<String,org.rocksdb.ColumnFamilyOptions> columnFamilyOptionsFactory, RocksDBNativeMetricOptions nativeMetricOptions, org.apache.flink.metrics.MetricGroup metricGroup, @Nonnull Collection<org.apache.flink.runtime.state.KeyedStateHandle> restoreStateHandles, @Nonnull RocksDbTtlCompactFiltersManager ttlCompactFiltersManager, @Nonnegative long writeBatchSize, Long writeBufferManagerCapacity)
-
-
Method Detail
-
restore
public RocksDBRestoreResult restore() throws IOException, org.apache.flink.util.StateMigrationException, org.rocksdb.RocksDBException
Restores all key-groups data that is referenced by the passed state handles.- Specified by:
restorein interfaceorg.apache.flink.runtime.state.RestoreOperation<K>- Specified by:
restorein interfaceRocksDBRestoreOperation- Throws:
IOExceptionorg.apache.flink.util.StateMigrationExceptionorg.rocksdb.RocksDBException
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-