Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23246 )
Change subject: KUDU-3662 [5/n] Add metrics support to replication ...................................................................... KUDU-3662 [5/n] Add metrics support to replication Adds three key metrics to monitor replication job state: - lastEndTimestamp: closing timestamp for diff scan iterations - pending: number of splits currently being fetched by readers - unassigned: number of splits enumerated but not yet assigned Uses reflection-based wrapper pattern to access private fields in KuduSourceEnumerator as temporary workaround until upstream Flink Kudu connector implements metrics support (FLINK-38187). The MetricWrappedKuduSource wraps the original KuduSource and delegates all operations while injecting a MetricWrappedKuduEnumerator that exposes internal state as Flink metrics. This approach allows clean removal once upstream metrics are available. Includes unit tests that verify metric existence and timestamp monotonic progression, though pending and unassigned split counts are difficult to test reliably in the current test setup. Change-Id: Ibfbd34c707e7539ee88863399ae3061683f8bb3b Reviewed-on: http://gerrit.cloudera.org:8080/23246 Reviewed-by: Alexey Serbin <[email protected]> Reviewed-by: Gabriella Lotz <[email protected]> Reviewed-by: Ashwani Raina <[email protected]> Tested-by: Marton Greber <[email protected]> --- M java/config/spotbugs/excludeFilter.xml M java/kudu-replication/build.gradle M java/kudu-replication/src/main/java/org/apache/kudu/replication/ReplicationEnvProvider.java A java/kudu-replication/src/main/java/org/apache/kudu/replication/wrappedsource/MetricWrappedKuduEnumerator.java A java/kudu-replication/src/main/java/org/apache/kudu/replication/wrappedsource/MetricWrappedKuduSource.java A java/kudu-replication/src/main/java/org/apache/kudu/replication/wrappedsource/ReflectionSecurityUtils.java A java/kudu-replication/src/test/java/org/apache/kudu/replication/TestReplicationMetrics.java A java/kudu-replication/src/test/resources/log4j2-test.properties 8 files changed, 574 insertions(+), 2 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Gabriella Lotz: Looks good to me, but someone else must approve Ashwani Raina: Looks good to me, but someone else must approve Marton Greber: Verified -- To view, visit http://gerrit.cloudera.org:8080/23246 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibfbd34c707e7539ee88863399ae3061683f8bb3b Gerrit-Change-Number: 23246 Gerrit-PatchSet: 7 Gerrit-Owner: Marton Greber <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]>
