Skip to content

Commit 10ed6c9

Browse files
committed
# This is a combination of 2 commits.
# This is the 1st commit message: fixed conflict # This is the commit message #2: fixd git fixed checkstyle fixed rat error. fixed ut test
1 parent 4d30636 commit 10ed6c9

File tree

49 files changed

+396
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+396
-87
lines changed

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/pom.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,23 @@ limitations under the License.
164164
</exclusions>
165165
</dependency>
166166

167+
<dependency>
168+
<groupId>io.debezium</groupId>
169+
<artifactId>debezium-connector-mysql</artifactId>
170+
<version>1.9.8.Final</version>
171+
<scope>compile</scope>
172+
</dependency>
167173
<dependency>
168174
<groupId>org.apache.flink</groupId>
169175
<artifactId>flink-cdc-base</artifactId>
170-
<version>3.4-SNAPSHOT</version>
176+
<version>${project.version}</version>
171177
<scope>compile</scope>
172178
</dependency>
173179
<dependency>
174-
<groupId>io.debezium</groupId>
175-
<artifactId>debezium-connector-mysql</artifactId>
176-
<version>1.9.8.Final</version>
177-
<scope>compile</scope>
180+
<groupId>org.apache.flink</groupId>
181+
<artifactId>flink-connector-test-util</artifactId>
182+
<version>${project.version}</version>
183+
<scope>test</scope>
178184
</dependency>
179185

180186
</dependencies>

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/io/debezium/connector/tidb/Listeners/TiDBAntlrDdlParserListener.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.debezium.connector.tidb.Listeners;
219

320
import io.debezium.antlr.AntlrDdlParserListener;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/io/debezium/connector/tidb/TiDBAntlrDdlParser.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.debezium.connector.tidb;
219

320
import org.apache.flink.cdc.connectors.tidb.source.converter.TiDBValueConverters;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/io/debezium/connector/tidb/TiDBEventMetadataProvider.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.debezium.connector.tidb;
219

320
import io.debezium.connector.AbstractSourceInfo;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/io/debezium/connector/tidb/TiDBPartition.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.debezium.connector.tidb;
219

320
import io.debezium.pipeline.spi.Partition;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/io/debezium/connector/tidb/TiDBTaskContext.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.debezium.connector.tidb;
219

320
import org.apache.flink.cdc.connectors.tidb.source.config.TiDBConnectorConfig;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/io/debezium/connector/tidb/TidbTopicSelector.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.debezium.connector.tidb;
219

320
import org.apache.flink.cdc.connectors.tidb.source.config.TiDBConnectorConfig;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/org/apache/flink/cdc/connectors/tidb/metrics/TiDBSourceMetrics.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
import static org.apache.flink.runtime.metrics.MetricNames.CURRENT_FETCH_EVENT_TIME_LAG;
2525
import static org.apache.flink.runtime.metrics.MetricNames.SOURCE_IDLE_TIME;
2626

27-
/** A collection class for handling metrics in {@link }. */
27+
/** A collection class for handling metrics in {@link TiKVRichParallelSourceFunction}. */
2828
public class TiDBSourceMetrics {
2929

3030
private final MetricGroup metricGroup;
3131

3232
/**
33-
* The last record processing time, which is updated after {@link } fetches a batch of data.
34-
* It's mainly used to report metrics sourceIdleTime for sourceIdleTime =
35-
* System.currentTimeMillis() - processTime.
33+
* The last record processing time, which is updated after {@link
34+
* TiKVRichParallelSourceFunction} fetches a batch of data. It's mainly used to report metrics
35+
* sourceIdleTime for sourceIdleTime = System.currentTimeMillis() - processTime.
3636
*/
3737
private long processTime = 0L;
3838

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/org/apache/flink/cdc/connectors/tidb/source/TiDBDialect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import java.util.List;
5555
import java.util.Map;
5656

57+
/** TiDB data source dialect. */
5758
public class TiDBDialect implements JdbcDataSourceDialect {
5859
private static final Logger LOG = LoggerFactory.getLogger(TiDBDialect.class);
5960

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/main/java/org/apache/flink/cdc/connectors/tidb/source/TiDBSourceBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
import static org.apache.flink.cdc.common.utils.Preconditions.checkNotNull;
3535

36+
/** Builder for {@link JdbcIncrementalSource}. */
3637
public class TiDBSourceBuilder<T> {
3738
private final TiDBSourceConfigFactory configFactory = new TiDBSourceConfigFactory();
3839
private EventOffsetFactory offsetFactory;
@@ -187,6 +188,7 @@ public TiDBIncrementalSource<T> build() {
187188
configFactory, checkNotNull(deserializer), offsetFactory, dialect);
188189
}
189190

191+
/** TiDB incremental source. */
190192
public static class TiDBIncrementalSource<T> extends JdbcIncrementalSource<T> {
191193
public TiDBIncrementalSource(
192194
JdbcSourceConfigFactory configFactory,

0 commit comments

Comments
 (0)