You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "stream2000 (via GitHub)" <gi...@apache.org> on 2023/08/03 06:30:57 UTC

[GitHub] [hudi] stream2000 commented on a diff in pull request #9350: [HUDI-2141] Support flink read metrics

stream2000 commented on code in PR #9350:
URL: https://github.com/apache/hudi/pull/9350#discussion_r1282707245


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/StreamReadOperator.java:
##########
@@ -168,6 +174,8 @@ private void processSplits() throws IOException {
       currentSplitState = SplitState.IDLE;
     }
 
+    readMetrics.setSplitLatestCommit(split.getLatestCommit());
+

Review Comment:
   The metrics will be updated for every new split. 



##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/StreamReadMonitoringFunction.java:
##########
@@ -262,9 +268,16 @@ public void snapshotState(FunctionSnapshotContext context) throws Exception {
     this.instantState.clear();
     if (this.issuedInstant != null) {
       this.instantState.add(this.issuedInstant);
+      this.readMetrics.setIssuedInstant(this.issuedInstant);
     }
     if (this.issuedOffset != null) {

Review Comment:
   The metrics will be updated for each checkpoint



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org