-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[INLONG-5903][Sort] Make InLong metric constructs factory more cohesive #5906
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls test with manager and check the result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unified processing of inLong -> inlong
...sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/MetricOption.java
Outdated
Show resolved
Hide resolved
...sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/MetricOption.java
Outdated
Show resolved
Hide resolved
...rt/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SinkMetricData.java
Outdated
Show resolved
Hide resolved
...rt/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SinkMetricData.java
Outdated
Show resolved
Hide resolved
.../sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SourceMetricData.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess inlong audit should not rely on inlongMetric since it only requires inlongGroup and inlongStream
02e8bce
to
7fc6499
Compare
...sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/MetricOption.java
Outdated
Show resolved
Hide resolved
.../sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SourceMetricData.java
Outdated
Show resolved
Hide resolved
mysql new source need modify metric option |
.../sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SourceMetricData.java
Outdated
Show resolved
Hide resolved
inlong-sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/Constants.java
Outdated
Show resolved
Hide resolved
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/configuration/Constants.java
Outdated
Show resolved
Hide resolved
… relevant to metric
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/configuration/Constants.java
Outdated
Show resolved
Hide resolved
...rt/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SinkMetricData.java
Outdated
Show resolved
Hide resolved
.../sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SourceMetricData.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/apache/inlong/sort/elasticsearch/table/RowElasticsearchSinkFunction.java
Outdated
Show resolved
Hide resolved
1. Add metric state init in MetricOption 2. Mysql new Source refactor with MetricOption 3. Add metric data toString to print some debug help infomation
…ut-of-place modification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
inlong-sort/sort-connectors/base/src/main/java/org/apache/inlong/sort/base/metric/SinkMetricData.java public void invoke(long rowCount, long rowSize) {
if (numRecordsOut != null) {
numRecordsOut.inc(rowCount);
}
if (numBytesOut != null) {
numBytesOut.inc(rowSize);
}
if (auditImp != null) {
auditImp.add(
Constants.AUDIT_SORT_OUTPUT,
getGroupId(),
getStreamId(),
System.currentTimeMillis(),
rowCount,
rowSize);
}
} lost numRecordsOutForMeter and numBytesOutForMeter computing |
fixed |
…ve (#5906) Co-authored-by: thesumery <158971219@qq.com>
…ve (apache#5906) Co-authored-by: thesumery <158971219@qq.com>
Prepare a Pull Request
(Change the title refer to the following example)
[INLONG-5903][Sort] Make InLong metric constructs factory more cohesive
(The following XYZ should be replaced by the actual GitHub Issue number)
Motivation
To make inlong sort metric code logic more clearly.
Modifications
Refactor
SinkMetricData
andSourceMetricData
constuct function.Add MetricOption to replace scattered metric configuration
Modify
inlong.audit
configuration tometrics.audit.proxy.hosts
to keep consistent with manager.