pnowojski commented on a change in pull request #10359: [FLINK-14813][metrics]
Provide `isBackPressured` Task metric
URL: https://github.com/apache/flink/pull/10359#discussion_r353247282
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
##########
@@ -351,6 +353,7 @@ public Task(
this.taskManagerConfig =
Preconditions.checkNotNull(taskManagerConfig);
this.metrics = metricGroup;
+ metricGroup.gauge(MetricNames.IS_BACKPRESSURED, new
BackPressureGauge(this));
Review comment:
> org.apache.flink.runtime.taskexecutor.TaskExecutor#submitTask will be
better.
I think that would be a safer, however a bit more ugly solution. I would go
with that option for now, especially that it looks like it's currently broken
(`consumableNotifyingPartitionWriters` is being initialised after this line).
and +1 for @zentol's suggestion of removing `BackPressureGauge` in favour
of a method reference.
----------------------------------------------------------------
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