tillrohrmann commented on a change in pull request #14923:
URL: https://github.com/apache/flink/pull/14923#discussion_r577423140



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/declarative/DeclarativeScheduler.java
##########
@@ -887,19 +897,22 @@ public void runIfState(State expectedState, Runnable 
action, Duration delay) {
 
     // ----------------------------------------------------------------
 
-    private void transitionToState(State newState) {
-        if (state != newState) {
-            LOG.debug(
-                    "Transition from state {} to {}.",
-                    state.getClass().getSimpleName(),
-                    newState.getClass().getSimpleName());
+    @VisibleForTesting
+    <S extends State> void transitionToState(
+            Supplier<S> stateTransition, Class<S> targetStateClass) {

Review comment:
       Admittedly it does not change a lot but I would go with the second 
option using a constructor. That way we wouldn't have to introduce a generic 
type parameter for `transitionToState`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to