mxm commented on code in PR #14878:
URL: https://github.com/apache/iceberg/pull/14878#discussion_r2635243742


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicWriter.java:
##########
@@ -145,6 +145,7 @@ public void write(DynamicRecordInternal element, Context 
context)
               return taskWriterFactory.create();
             })
         .write(element.rowData());
+    metrics.numRecordsOutCounter().inc();

Review Comment:
   >I wanted to use a standard Flink metric because things like Autoscaler 
might rely on it to estimate throughput.
   
   Flink Autoscaling compares numRecordsIn of operators with numRecordsOut of 
their upstream operators. If the two metric values are identical, the operator 
does not need scaling (slightly simplified). That should work fine with the 
DynamicWriter. Similarly, it should work for the dowstream aggregator operator 
and committer operator (actually fixed to parallelism 1).
   
   +1 for using the SinkWriterMetricGroup metrics.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to