flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StefanRRichter <...@git.apache.org>
Subject [GitHub] flink pull request #5239: [FLINK-8360] Implement task-local state recovery
Date Fri, 19 Jan 2018 10:21:27 GMT
Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5239#discussion_r162584893
  
    --- Diff: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/StreamOperatorSnapshotRestoreTest.java
---
    @@ -98,7 +101,26 @@ public Integer getKey(Integer value) throws Exception {
     				TypeInformation.of(Integer.class),
     				MAX_PARALLELISM,
     				1 /* num subtasks */,
    -				0 /* subtask index */);
    +				0 /* subtask index */) {
    +
    +			@Override
    +			protected StreamTaskStateManager createStreamTaskStateManager(
    +				Environment env,
    +				StateBackend stateBackend,
    +				ProcessingTimeService processingTimeService) {
    +
    +				return new StreamTaskStateManagerImpl(env, stateBackend, processingTimeService) {
    +					@Override
    +					protected <K> InternalTimeServiceManager<?, K> internalTimeServiceManager(
    +						AbstractKeyedStateBackend<K> keyedStatedBackend,
    +						KeyContext keyContext,
    +						Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) throws Exception
{
    +
    +						return null;
    --- End diff --
    
    Yes, this is a workaround, because this is a dedicated test for raw keyed states - which
is otherwise consumed immediately to restore a timer service. This will fail because we wrote
only test data to the stream, not the data for a timer service.


---

Mime
View raw message