liuxiao2shf commented on code in PR #3619:
URL: https://github.com/apache/flink-cdc/pull/3619#discussion_r1793080478


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/metrics/SourceEnumeratorMetrics.java:
##########
@@ -0,0 +1,251 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.cdc.connectors.base.source.metrics;
+
+import org.apache.flink.metrics.Gauge;
+import org.apache.flink.metrics.MetricGroup;
+import org.apache.flink.metrics.groups.SplitEnumeratorMetricGroup;
+
+import io.debezium.relational.TableId;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** A collection class for handling metrics in {@link 
SourceEnumeratorMetrics}. */
+public class SourceEnumeratorMetrics {
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(SourceEnumeratorMetrics.class);
+    // Constants
+    public static final int UNDEFINED = 0;
+
+    // Metric names
+    public static final String IS_SNAPSHOTTING = "isSnapshotting";
+    public static final String IS_STREAM_READING = "isStreamReading";
+    public static final String NUM_TABLES_SNAPSHOTTED = "numTablesSnapshotted";
+    public static final String NUM_TABLES_REMAINING = "numTablesRemaining";
+    public static final String NUM_SNAPSHOT_SPLITS_PROCESSED = 
"numSnapshotSplitsProcessed";
+    public static final String NUM_SNAPSHOT_SPLITS_REMAINING = 
"numSnapshotSplitsRemaining";
+    public static final String NUM_SNAPSHOT_SPLITS_FINISHED = 
"numSnapshotSplitsFinished";
+    public static final String SNAPSHOT_START_TIME = "snapshotStartTime";
+    public static final String SNAPSHOT_END_TIME = "snapshotEndTime";
+    public static final String DATABASE_GROUP_KEY = "database";

Review Comment:
   Ok, it has been adjusted



-- 
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]

Reply via email to