You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/12 07:55:11 UTC

[GitHub] tzulitai commented on a change in pull request #7048: [FLINK-10809][state] Include keyed state that is not from head operat…

tzulitai commented on a change in pull request #7048: [FLINK-10809][state] Include keyed state that is not from head operat…
URL: https://github.com/apache/flink/pull/7048#discussion_r232559236
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/datastream/ReinterpretDataStreamAsKeyedStreamITCase.java
 ##########
 @@ -227,5 +293,22 @@ public void close() throws Exception {
 			Assert.assertEquals(expectedSum, runningSum);
 			super.close();
 		}
+
+		@Override
+		public void snapshotState(FunctionSnapshotContext context) throws Exception {
+			sumState.add(runningSum);
+		}
+
+		@Override
+		public void initializeState(FunctionInitializationContext context) throws Exception {
+			sumState = context.getOperatorStateStore().getListState(
+				new ListStateDescriptor<>("sumState", Integer.class));
+
+			if (context.isRestored()) {
 
 Review comment:
   Where do we check whether or not we actually have restore something?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services