From 6ae728a73c1441b39d6ffc6a733563a11fe7284b Mon Sep 17 00:00:00 2001 From: Manjunath Date: Fri, 3 Jan 2025 13:18:42 +0530 Subject: [PATCH] #000: Review comment fix - Generation of metrics --- .../sunbird/obsrv/function/RowDataConverterFunction.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipeline/hudi-connector/src/main/scala/org/sunbird/obsrv/function/RowDataConverterFunction.scala b/pipeline/hudi-connector/src/main/scala/org/sunbird/obsrv/function/RowDataConverterFunction.scala index 707b224c..6fbdbb1a 100644 --- a/pipeline/hudi-connector/src/main/scala/org/sunbird/obsrv/function/RowDataConverterFunction.scala +++ b/pipeline/hudi-connector/src/main/scala/org/sunbird/obsrv/function/RowDataConverterFunction.scala @@ -40,8 +40,8 @@ class RowDataConverterFunction(config: HudiConnectorConfig, datasetId: String) e hudiSchemaParser = new HudiSchemaParser() // Register Flink metrics for inputEventCount and failedEventCount - inputEventCount = getRuntimeContext.getMetricGroup.counter("inputEventCount") - failedEventCount = getRuntimeContext.getMetricGroup.counter("failedEventCount") + inputEventCount = getRuntimeContext.getMetricGroup.counter("inputEventCountdata") + failedEventCount = getRuntimeContext.getMetricGroup.counter("failedEventCountdata") } override def map(event: MMap[String, AnyRef]): RowData = { @@ -79,8 +79,8 @@ class RowDataConverterFunction(config: HudiConnectorConfig, datasetId: String) e // Custom method to retrieve the metric values (e.g., for exposing them in a monitoring system) def getMetrics: Map[String, Long] = { Map( - "inputEventCount" -> inputEventCount.getCount, - "failedEventCount" -> failedEventCount.getCount + "inputEventCountdata" -> inputEventCount.getCount, + "failedEventCountdata" -> failedEventCount.getCount ) } }