use of org.apache.flink.runtime.state.IncrementalLocalKeyedStateHandle in project flink by apache.
the class RocksDBIncrementalRestoreOperation method restoreWithoutRescaling.
/**
* Recovery from a single remote incremental state without rescaling.
*/
@SuppressWarnings("unchecked")
private void restoreWithoutRescaling(KeyedStateHandle keyedStateHandle) throws Exception {
logger.info("Starting to restore from state handle: {} without rescaling.", keyedStateHandle);
if (keyedStateHandle instanceof IncrementalRemoteKeyedStateHandle) {
IncrementalRemoteKeyedStateHandle incrementalRemoteKeyedStateHandle = (IncrementalRemoteKeyedStateHandle) keyedStateHandle;
restorePreviousIncrementalFilesStatus(incrementalRemoteKeyedStateHandle);
restoreFromRemoteState(incrementalRemoteKeyedStateHandle);
} else if (keyedStateHandle instanceof IncrementalLocalKeyedStateHandle) {
IncrementalLocalKeyedStateHandle incrementalLocalKeyedStateHandle = (IncrementalLocalKeyedStateHandle) keyedStateHandle;
restorePreviousIncrementalFilesStatus(incrementalLocalKeyedStateHandle);
restoreFromLocalState(incrementalLocalKeyedStateHandle);
} else {
throw unexpectedStateHandleException(new Class[] { IncrementalRemoteKeyedStateHandle.class, IncrementalLocalKeyedStateHandle.class }, keyedStateHandle.getClass());
}
logger.info("Finished restoring from state handle: {} without rescaling.", keyedStateHandle);
}
Aggregations