xuzhiwen1255 commented on code in PR #22010:
URL: https://github.com/apache/flink/pull/22010#discussion_r1261875654
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/datagen/SequenceGenerator.java:
##########
@@ -189,8 +206,28 @@ public static SequenceGenerator<String>
stringGenerator(long start, long end) {
return new SequenceGenerator<String>(start, end) {
@Override
public String next() {
- return valuesToEmit.poll().toString();
+ return nextValue().toString();
}
};
}
+
+ /**
+ * The internal state of the sequence generator, which is used to record
the latest state of the
+ * sequence value sent by the current sequence generator. When recovering
from the state, it is
+ * guaranteed to continue sending the sequence value from the latest state.
+ */
+ private static class InternalState implements Comparable<InternalState> {
Review Comment:
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]