gyfora commented on code in PR #509: URL: https://github.com/apache/flink-kubernetes-operator/pull/509#discussion_r1087868130
########## examples/autoscaling/src/main/java/autoscaling/AutoscalingExample.java: ########## @@ -18,23 +18,38 @@ package autoscaling; +import org.apache.flink.api.common.functions.RichMapFunction; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; +import org.apache.flink.streaming.api.functions.sink.SinkFunction; /** Autoscaling Example. */ public class AutoscalingExample { public static void main(String[] args) throws Exception { var env = StreamExecutionEnvironment.getExecutionEnvironment(); - DataStream<Long> stream = env.fromSequence(Long.MIN_VALUE, Long.MAX_VALUE); + long numIterations = Long.parseLong(args[0]); + DataStream<Long> stream = + env.fromSequence(Long.MIN_VALUE, Long.MAX_VALUE).filter(i -> System.nanoTime() > 1); stream = - stream.shuffle() + stream.keyBy(s -> "s") Review Comment: I think it may be better to keep to `shuffle()` here, I was just testing some skew scenarios and forgot this in. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org