((AbstractKeyedStateBackend<?>) keyedStateBackend).requiresLegacySynchronousTimerSnapshots()) {
protected <K> InternalTimeServiceManager<K> internalTimeServiceManager( AbstractKeyedStateBackend<K> keyedStatedBackend, KeyContext keyContext, //the operator Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) throws Exception { if (keyedStatedBackend == null) { return null; } final KeyGroupRange keyGroupRange = keyedStatedBackend.getKeyGroupRange(); final InternalTimeServiceManager<K> timeServiceManager = new InternalTimeServiceManager<>( keyGroupRange, keyContext, keyedStatedBackend, processingTimeService, keyedStatedBackend.requiresLegacySynchronousTimerSnapshots()); // and then initialize the timer services for (KeyGroupStatePartitionStreamProvider streamProvider : rawKeyedStates) { int keyGroupIdx = streamProvider.getKeyGroupId(); Preconditions.checkArgument(keyGroupRange.contains(keyGroupIdx), "Key Group " + keyGroupIdx + " does not belong to the local range."); timeServiceManager.restoreStateForKeyGroup( streamProvider.getStream(), keyGroupIdx, environment.getUserClassLoader()); } return timeServiceManager; }
((AbstractKeyedStateBackend<?>) keyedStateBackend).requiresLegacySynchronousTimerSnapshots()) {
((AbstractKeyedStateBackend<?>) keyedStateBackend).requiresLegacySynchronousTimerSnapshots()) {
protected <K> InternalTimeServiceManager<K> internalTimeServiceManager( AbstractKeyedStateBackend<K> keyedStatedBackend, KeyContext keyContext, //the operator Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) throws Exception { if (keyedStatedBackend == null) { return null; } final KeyGroupRange keyGroupRange = keyedStatedBackend.getKeyGroupRange(); final InternalTimeServiceManager<K> timeServiceManager = new InternalTimeServiceManager<>( keyGroupRange, keyContext, keyedStatedBackend, processingTimeService, keyedStatedBackend.requiresLegacySynchronousTimerSnapshots()); // and then initialize the timer services for (KeyGroupStatePartitionStreamProvider streamProvider : rawKeyedStates) { int keyGroupIdx = streamProvider.getKeyGroupId(); Preconditions.checkArgument(keyGroupRange.contains(keyGroupIdx), "Key Group " + keyGroupIdx + " does not belong to the local range."); timeServiceManager.restoreStateForKeyGroup( streamProvider.getStream(), keyGroupIdx, environment.getUserClassLoader()); } return timeServiceManager; }
protected <K> InternalTimeServiceManager<K> internalTimeServiceManager( AbstractKeyedStateBackend<K> keyedStatedBackend, KeyContext keyContext, //the operator Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) throws Exception { if (keyedStatedBackend == null) { return null; } final KeyGroupRange keyGroupRange = keyedStatedBackend.getKeyGroupRange(); final InternalTimeServiceManager<K> timeServiceManager = new InternalTimeServiceManager<>( keyGroupRange, keyContext, keyedStatedBackend, processingTimeService, keyedStatedBackend.requiresLegacySynchronousTimerSnapshots()); // and then initialize the timer services for (KeyGroupStatePartitionStreamProvider streamProvider : rawKeyedStates) { int keyGroupIdx = streamProvider.getKeyGroupId(); Preconditions.checkArgument(keyGroupRange.contains(keyGroupIdx), "Key Group " + keyGroupIdx + " does not belong to the local range."); timeServiceManager.restoreStateForKeyGroup( streamProvider.getStream(), keyGroupIdx, environment.getUserClassLoader()); } return timeServiceManager; }