zhijiangW commented on a change in pull request #10083: 
[FLINK-14472][runtime]Implement back-pressure monitor with non-blocking outputs.
URL: https://github.com/apache/flink/pull/10083#discussion_r342974445
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/BackPressureStatsTrackerImpl.java
 ##########
 @@ -322,41 +266,18 @@ private OperatorBackPressureStats 
createStatsFromSample(StackTraceSample sample)
                                }
                        }
 
-                       // Ratio of blocked samples to total samples per sub 
task. Array
-                       // position corresponds to sub task index.
-                       double[] backPressureRatio = new double[traces.size()];
-
-                       for (Entry<ExecutionAttemptID, 
List<StackTraceElement[]>> entry : traces.entrySet()) {
-                               int backPressureSamples = 0;
-
-                               List<StackTraceElement[]> taskTraces = 
entry.getValue();
-
-                               for (StackTraceElement[] trace : taskTraces) {
-                                       for (int i = trace.length - 1; i >= 0; 
i--) {
-                                               StackTraceElement elem = 
trace[i];
-
-                                               if 
(elem.getClassName().equals(EXPECTED_CLASS_NAME) &&
-                                                               
elem.getMethodName().equals(EXPECTED_METHOD_NAME)) {
-
-                                                       backPressureSamples++;
-                                                       break; // Continue with 
next stack trace
-                                               }
-                                       }
-                               }
+                       // Back pressure ratio of all tasks. Array position 
corresponds
+                       // to sub task index.
+                       double[] backPressureRatio = new 
double[backPressureRatioByTask.size()];
 
 Review comment:
   backPressureRatio -> backPressureRatios

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to