use of org.apache.flink.migration.runtime.state.memory.AbstractMigrationRestoreStrategy in project flink by apache.
the class AbstractFsStateSnapshot method deserialize.
@Override
@SuppressWarnings("unchecked")
public StateTable<K, N, SV> deserialize(String stateName, HeapKeyedStateBackend<K> stateBackend) throws IOException {
final FileSystem fs = getFilePath().getFileSystem();
try (FSDataInputStream inStream = fs.open(getFilePath())) {
final DataInputViewStreamWrapper inView = new DataInputViewStreamWrapper(inStream);
AbstractMigrationRestoreStrategy<K, N, SV> restoreStrategy = new AbstractMigrationRestoreStrategy<K, N, SV>(keySerializer, namespaceSerializer, stateSerializer) {
@Override
protected DataInputView openDataInputView() throws IOException {
return inView;
}
};
return restoreStrategy.deserialize(stateName, stateBackend);
}
}
Aggregations