zentol commented on a change in pull request #18825:
URL: https://github.com/apache/flink/pull/18825#discussion_r809748447
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/InternalSinkWriterMetricGroup.java
##########
@@ -35,12 +35,20 @@
implements SinkWriterMetricGroup {
private final Counter numRecordsOutErrors;
+ private final Counter numRecordsWritten;
+ private final Counter numBytesWritten;
private final OperatorIOMetricGroup operatorIOMetricGroup;
private InternalSinkWriterMetricGroup(
MetricGroup parentMetricGroup, OperatorIOMetricGroup
operatorIOMetricGroup) {
super(parentMetricGroup);
numRecordsOutErrors =
parentMetricGroup.counter(MetricNames.NUM_RECORDS_OUT_ERRORS);
+ numRecordsWritten =
+ parentMetricGroup.counter(
+
org.apache.flink.runtime.metrics.MetricNames.IO_NUM_RECORDS_OUT);
Review comment:
This doesn't really work. You are registering a second counter with the
same name of one that already exists, returning you a dummy counter which is
never exported. You could just as well create a plain SimpleCounter if that is
the intention.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/InternalSinkWriterMetricGroup.java
##########
@@ -71,6 +79,16 @@ public Counter getNumRecordsOutErrorsCounter() {
return numRecordsOutErrors;
}
+ @Override
+ public org.apache.flink.metrics.Counter getNumRecordsWrittenCounter() {
Review comment:
What's up with the the lack of imports?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]