afedulov commented on code in PR #21774:
URL: https://github.com/apache/flink/pull/21774#discussion_r1242028579
##########
flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/windowing/TopSpeedWindowing.java:
##########
@@ -99,7 +104,20 @@ public static void main(String[] args) throws Exception {
.map(new ParseCarData())
.name("parse-input");
} else {
- carData =
env.addSource(CarSource.create(2)).name("in-memory-source");
+ CarGeneratorFunction carGenerator = new CarGeneratorFunction(2);
+ DataGeneratorSource<Tuple4<Integer, Integer, Double, Long>>
carGeneratorSource =
+ new DataGeneratorSource<>(
+ carGenerator,
+ Long.MAX_VALUE,
+ parallelismIgnored -> new GuavaRateLimiter(1),
+ TypeInformation.of(
+ new TypeHint<Tuple4<Integer, Integer,
Double, Long>>() {}));
+ carData =
+ env.fromSource(
+ carGeneratorSource,
+ WatermarkStrategy.noWatermarks(),
Review Comment:
To be honest I am not quite sure which feature this example originally
intended to cover. I know that there is also some consensus that usage of
advanced windows with triggers and evictors is somewhat discouraged and should
not be promoted.
cc @alpinegizmo would appreciate your opinion
--
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]