SinBex commented on code in PR #21695:
URL: https://github.com/apache/flink/pull/21695#discussion_r1081134448


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/slowtaskdetector/ExecutionTimeBasedSlowTaskDetector.java:
##########
@@ -225,10 +244,56 @@ private long getExecutionTime(final Execution execution, 
final long currentTime)
         }
     }
 
+    private long getExecutionInputNumBytes(final Execution execution) {
+        return execution.getVertex().getExecutionVertexInputNumBytes();
+    }
+
+    private ExecutionTimeWithInputNumBytes getExecutionTimeAndInputNumBytes(
+            Execution execution, final long currentTime) {
+        long executionTime = getExecutionTime(execution, currentTime);
+        long executionInputNumBytes = getExecutionInputNumBytes(execution);
+
+        return new ExecutionTimeWithInputNumBytes(executionTime, 
executionInputNumBytes);
+    }
+
     @Override
     public void stop() {
         if (scheduledDetectionFuture != null) {
             scheduledDetectionFuture.cancel(false);
         }
     }
+
+    /** This class defines the execution time and input number bytes for an 
execution. */
+    @VisibleForTesting
+    static class ExecutionTimeWithInputNumBytes

Review Comment:
   Thanks for your suggestions! fix this.



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

Reply via email to