chestnut-c commented on code in PR #6585:
URL: https://github.com/apache/inlong/pull/6585#discussion_r1029977267
##########
inlong-sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SourceMetricData.java:
##########
@@ -222,18 +389,119 @@ public void outputMetrics(long rowCountSize, long
rowDataSize) {
}
}
+ public void outputMetrics(long rowCountSize, long rowDataSize, boolean
isSnapshotRecord) {
+
+ outputMetrics(rowCountSize, rowDataSize);
+
+ if (readPhase == null) {
+ return;
+ }
+ long count = this.readPhase.getCount();
+ if (isSnapshotRecord && count != SNAPSHOT_PHASE) {
+ this.readPhase.dec(count);
+ this.readPhase.inc(SNAPSHOT_PHASE);
+ } else if (!isSnapshotRecord && count != INCREASE_PHASE) {
+ this.readPhase.dec(count);
+ this.readPhase.inc(INCREASE_PHASE);
+ }
+ }
+
@Override
public String toString() {
return "SourceMetricData{"
+ "metricGroup=" + metricGroup
+ ", labels=" + labels
+ + ", metricType=" + metricType
+ + ", readPhase=" + (readPhase != null ? readPhase.getCount() :
null)
+ ", numRecordsIn=" + numRecordsIn.getCount()
+ ", numBytesIn=" + numBytesIn.getCount()
+ ", numRecordsInForMeter=" + numRecordsInForMeter.getCount()
+ ", numBytesInForMeter=" + numBytesInForMeter.getCount()
+ ", numRecordsInPerSecond=" + numRecordsInPerSecond.getRate()
+ ", numBytesInPerSecond=" + numBytesInPerSecond.getRate()
+ ", auditOperator=" + auditOperator
+ + ", subSourceMetricMap=" + subSourceMetricMap
+ '}';
}
+
+ /**
+ * Source Record Schema Info
+ */
+ public static class SourceRecordSchemaInfo {
+
+ @NonNull
+ private String databaseName;
Review Comment:
ok,I will add the form of kafka topic, although it is not used at present.
--
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]