Skip to content

Commit

Permalink
[INLONG-7639][Sort] Metric label list constants are issued by each co…
Browse files Browse the repository at this point in the history
…nnector (apache#7640)

(cherry picked from commit 21262a4)
  • Loading branch information
e-mhui authored and menghuiyu committed Mar 31, 2023
1 parent 01d2cc8 commit c335dc8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 231 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.inlong.sort.cdc.base.config;

import java.io.Serializable;
import java.util.List;

/** The mertic configuration which offers basic metric configuration. **/
public interface MetricConfig extends Serializable {
Expand All @@ -36,4 +37,12 @@ public interface MetricConfig extends Serializable {
*/
String getInlongAudit();

/**
* getMetricLabelList
*
* @return metric label list of each connector.
* eg: oracle metric label list is [DATABASE, SCHEMA, TABLE]
*/
List<String> getMetricLabelList();

}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public IncrementalSourceReader<T, C> createReader(SourceReaderContext readerCont
.withRegisterMetric(RegisteredMetric.ALL)
.build();

sourceReaderMetrics.registerMetrics(metricOption);
sourceReaderMetrics.registerMetrics(metricOption, metricConfig.getMetricLabelList());
Supplier<IncrementalSourceSplitReader<C>> splitReaderSupplier =
() -> new IncrementalSourceSplitReader<>(
readerContext.getIndexOfSubtask(), dataSourceDialect, sourceConfig);
Expand Down

This file was deleted.

0 comments on commit c335dc8

Please sign in to comment.