use of org.apache.flink.runtime.state.restore.SavepointRestoreResult in project flink by apache.
the class HeapSavepointRestoreOperation method restore.
@Override
public Void restore() throws Exception {
registeredKVStates.clear();
registeredPQStates.clear();
try (ThrowingIterator<SavepointRestoreResult> restore = this.savepointRestoreOperation.restore()) {
while (restore.hasNext()) {
SavepointRestoreResult restoreResult = restore.next();
List<StateMetaInfoSnapshot> restoredMetaInfos = restoreResult.getStateMetaInfoSnapshots();
final Map<Integer, StateMetaInfoSnapshot> kvStatesById = this.heapMetaInfoRestoreOperation.createOrCheckStateForMetaInfo(restoredMetaInfos, registeredKVStates, registeredPQStates);
try (ThrowingIterator<KeyGroup> keyGroups = restoreResult.getRestoredKeyGroups()) {
while (keyGroups.hasNext()) {
readKeyGroupStateData(keyGroups.next(), keySerializerProvider.previousSchemaSerializer(), kvStatesById);
}
}
}
}
return null;
}
Aggregations