EMsnap commented on code in PR #8085:
URL: https://github.com/apache/inlong/pull/8085#discussion_r1204944769
##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source2/BaseSource.java:
##########
@@ -251,10 +233,14 @@ public synchronized void start() {
CommonConfigHolder.getInstance().getClusterName(), getName(),
String.valueOf(srcPort));
MetricRegister.register(metricItemSet);
// init monitor logic
- if (fileMetricOn) {
- this.monitorIndex = new MonitorIndex("Source", monitorStatInvlSec,
maxMonitorStatCnt);
+ if (CommonConfigHolder.getInstance().isEnableFileMetric()) {
+ this.monitorIndex = new MonitorIndex("Source",
Review Comment:
maybe "Source" should be a constant ?
##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/common/SinkContext.java:
##########
@@ -80,6 +85,16 @@ public SinkContext(String sinkName, Context context, Channel
channel) {
* start
*/
public void start() {
+ // init monitor logic
+ if (CommonConfigHolder.getInstance().isEnableFileMetric()) {
+ this.monitorIndex = new MonitorIndex("Sink",
Review Comment:
I guess Sink should be a constant here
--
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]