gong commented on code in PR #6931:
URL: https://github.com/apache/inlong/pull/6931#discussion_r1053936640
##########
inlong-sort/sort-connectors/mongodb-cdc/src/main/java/org/apache/inlong/sort/cdc/mongodb/DebeziumSourceFunction.java:
##########
@@ -505,11 +505,11 @@ public void deserialize(SourceRecord record, Collector<T>
out) throws Exception
source =
value.getStruct(RecordUtils.DOCUMENT_TO_FIELD);
}
String dbName =
source.getString(MongoDBEnvelope.NAMESPACE_DATABASE_FIELD);
- String tableName =
source.getString(MongoDBEnvelope.NAMESPACE_COLLECTION_FIELD);
+ String collectionName =
source.getString(MongoDBEnvelope.NAMESPACE_COLLECTION_FIELD);
SnapshotRecord snapshotRecord =
SnapshotRecord.fromSource(source);
boolean isSnapshotRecord =
(SnapshotRecord.TRUE == snapshotRecord);
sourceMetricData
- .outputMetricsWithEstimate(dbName,
tableName, isSnapshotRecord, value);
+ .outputMetricsWithEstimate(dbName,
collectionName, isSnapshotRecord, value);
Review Comment:
mongo table level metric use collection. Not to use table. Full metric name
is
flink_taskmanager_job_task_operator_groupId_streamId_nodeId_database_collection_numRecordsIn.
You need modify this method `outputMetricsWithEstimate` that produce metric
group and label.
--
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]