Search in sources :

Example 1 with SnapshotDirectory

use of org.apache.flink.runtime.state.SnapshotDirectory in project flink by apache.

the class RocksIncrementalSnapshotStrategy method syncPrepareResources.

@Override
public IncrementalRocksDBSnapshotResources syncPrepareResources(long checkpointId) throws Exception {
    final SnapshotDirectory snapshotDirectory = prepareLocalSnapshotDirectory(checkpointId);
    LOG.trace("Local RocksDB checkpoint goes to backup path {}.", snapshotDirectory);
    final List<StateMetaInfoSnapshot> stateMetaInfoSnapshots = new ArrayList<>(kvStateInformation.size());
    final PreviousSnapshot previousSnapshot = snapshotMetaData(checkpointId, stateMetaInfoSnapshots);
    takeDBNativeCheckpoint(snapshotDirectory);
    return new IncrementalRocksDBSnapshotResources(snapshotDirectory, previousSnapshot, stateMetaInfoSnapshots);
}
Also used : ArrayList(java.util.ArrayList) StateMetaInfoSnapshot(org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot) SnapshotDirectory(org.apache.flink.runtime.state.SnapshotDirectory)

Aggregations

ArrayList (java.util.ArrayList)1 SnapshotDirectory (org.apache.flink.runtime.state.SnapshotDirectory)1 StateMetaInfoSnapshot (org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot)1