echauchot commented on code in PR #22985: URL: https://github.com/apache/flink/pull/22985#discussion_r1287027621
########## flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/Executing.java: ########## @@ -39,14 +42,22 @@ import javax.annotation.Nullable; import java.time.Duration; +import java.time.Instant; import java.util.List; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; /** State which represents a running job with an {@link ExecutionGraph} and assigned slots. */ class Executing extends StateWithExecutionGraph implements ResourceListener { private final Context context; + private Instant lastRescale = Instant.EPOCH; + private final ScheduledExecutorService scheduledExecutor = Executors.newScheduledThreadPool(1); Review Comment: :+1: agree I could use `runIfState()` -- 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