zhijiangW commented on a change in pull request #8455:
[FLINK-12284,FLINK-12637][Network,Metrics]Fix the incorrect inputBufferUsage
metric in credit-based network mode
URL: https://github.com/apache/flink/pull/8455#discussion_r295101589
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NettyShuffleEnvironment.java
##########
@@ -303,7 +309,18 @@ private void registerInputMetrics(MetricGroup inputGroup,
MetricGroup buffersGro
InputGateMetrics.registerQueueLengthMetrics(inputGroup,
inputGates);
}
buffersGroup.gauge(METRIC_INPUT_QUEUE_LENGTH, new
InputBuffersGauge(inputGates));
- buffersGroup.gauge(METRIC_INPUT_POOL_USAGE, new
InputBufferPoolUsageGauge(inputGates));
+
+ if (config.isCreditBased()) {
+ FloatingBuffersUsageGauge floatingBuffersUsageGauge =
new FloatingBuffersUsageGauge(inputGates);
+ ExclusiveBuffersUsageGauge exclusiveBuffersUsageGauge =
new ExclusiveBuffersUsageGauge(inputGates);
+
+
buffersGroup.gauge(METRIC_INPUT_EXCLUSIVE_BUFFERS_USAGE,
exclusiveBuffersUsageGauge);
+ buffersGroup.gauge(METRIC_INPUT_FLOATING_BUFFERS_USAGE,
floatingBuffersUsageGauge);
+ buffersGroup.gauge(METRIC_INPUT_POOL_USAGE, new
CreditBasedInputBufferPoolUsageGauge(floatingBuffersUsageGauge,
+ exclusiveBuffersUsageGauge, inputGates));
Review comment:
If the parameters are broken into separate lines, make every parameter in a
separate line.
----------------------------------------------------------------
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