You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/07/28 03:20:00 UTC

[GitHub] [inlong] EMsnap commented on a diff in pull request #5237: [INLONG-5217][Sort] Add connector-base component for common code

EMsnap commented on code in PR #5237:
URL: https://github.com/apache/inlong/pull/5237#discussion_r931745993


##########
inlong-sort/sort-connectors/postgres-cdc/src/main/java/org.apache.inlong.sort.cdc.postgres/DebeziumSourceFunction.java:
##########
@@ -423,11 +424,13 @@ public void run(SourceContext<T> sourceContext) throws Exception {
             String groupId = inlongMetricArray[0];
             String streamId = inlongMetricArray[1];
             String nodeId = inlongMetricArray[2];
-            metricData = new MetricData(metricGroup);
-            metricData.registerMetricsForNumRecordsIn(groupId, streamId, nodeId, "numRecordsIn");
-            metricData.registerMetricsForNumBytesIn(groupId, streamId, nodeId, "numBytesIn");
-            metricData.registerMetricsForNumBytesInPerSecond(groupId, streamId, nodeId, "numBytesInPerSecond");
-            metricData.registerMetricsForNumRecordsInPerSecond(groupId, streamId, nodeId, "numRecordsInPerSecond");
+            sourceMetricData = new SourceMetricData(metricGroup);
+            sourceMetricData.registerMetricsForNumRecordsIn(groupId, streamId, nodeId, "numRecordsIn");
+            sourceMetricData.registerMetricsForNumBytesIn(groupId, streamId, nodeId, "numBytesIn");

Review Comment:
   "numBytesIn" can be extracted to constant



-- 
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@inlong.apache.org

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