[FLINK-34584][cdc][build] Rename package from com.ververica to org.apache.flink

This closes #3089.
pull/3107/head
Hang Ruan 11 months ago committed by GitHub
parent a6c1b06e11
commit e10c8691ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -117,8 +117,8 @@ Include following Maven dependency (available through Maven Central):
```java ```java
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.mysql.source.MySqlSource; import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
public class MySqlSourceExample { public class MySqlSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -225,7 +225,7 @@ _Note: the mechanism of `scan.startup.mode` option relying on Debezium's `snapsh
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
public class Db2SourceExample { public class Db2SourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -438,8 +438,8 @@ MongoDB CDC 连接器也可以是一个数据流源。 你可以创建 SourceFun
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.mongodb.MongoDBSource; import org.apache.flink.cdc.connectors.mongodb.MongoDBSource;
public class MongoDBSourceExample { public class MongoDBSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
@ -466,8 +466,8 @@ MongoDB CDC 增量连接器2.3.0 之后)可以使用,如下所示:
```java ```java
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.connectors.mongodb.source.MongoDBSource; import org.apache.flink.cdc.connectors.mongodb.source.MongoDBSource;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
public class MongoDBIncrementalSourceExample { public class MongoDBIncrementalSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -448,8 +448,8 @@ The MongoDB CDC connector can also be a DataStream source. You can create a Sour
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.mongodb.MongoDBSource; import org.apache.flink.cdc.connectors.mongodb.MongoDBSource;
public class MongoDBSourceExample { public class MongoDBSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
@ -476,8 +476,8 @@ The MongoDB CDC incremental connector (after 2.3.0) can be used as the following
```java ```java
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.connectors.mongodb.source.MongoDBSource; import org.apache.flink.cdc.connectors.mongodb.source.MongoDBSource;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
public class MongoDBIncrementalSourceExample { public class MongoDBIncrementalSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -652,8 +652,8 @@ CREATE TABLE mysql_source (...) WITH (
```java ```java
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.mysql.source.MySqlSource; import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
public class MySqlSourceExample { public class MySqlSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -666,8 +666,8 @@ could fail as the Debezium reader keeps the current latest table schema internal
```java ```java
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.mysql.source.MySqlSource; import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
public class MySqlSourceExample { public class MySqlSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -443,10 +443,10 @@ import org.apache.flink.table.data.RowData;
import org.apache.flink.table.runtime.typeutils.InternalTypeInfo; import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
import org.apache.flink.table.types.logical.RowType; import org.apache.flink.table.types.logical.RowType;
import com.ververica.cdc.connectors.oceanbase.OceanBaseSource; import org.apache.flink.cdc.connectors.oceanbase.OceanBaseSource;
import com.ververica.cdc.connectors.oceanbase.source.RowDataOceanBaseDeserializationSchema; import org.apache.flink.cdc.connectors.oceanbase.source.RowDataOceanBaseDeserializationSchema;
import com.ververica.cdc.connectors.oceanbase.table.OceanBaseDeserializationSchema; import org.apache.flink.cdc.connectors.oceanbase.table.OceanBaseDeserializationSchema;
import com.ververica.cdc.connectors.oceanbase.table.StartupMode; import org.apache.flink.cdc.connectors.oceanbase.table.StartupMode;
import java.time.ZoneId; import java.time.ZoneId;
import java.util.Arrays; import java.util.Arrays;

@ -451,10 +451,10 @@ import org.apache.flink.table.data.RowData;
import org.apache.flink.table.runtime.typeutils.InternalTypeInfo; import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
import org.apache.flink.table.types.logical.RowType; import org.apache.flink.table.types.logical.RowType;
import com.ververica.cdc.connectors.oceanbase.OceanBaseSource; import org.apache.flink.cdc.connectors.oceanbase.OceanBaseSource;
import com.ververica.cdc.connectors.oceanbase.source.RowDataOceanBaseDeserializationSchema; import org.apache.flink.cdc.connectors.oceanbase.source.RowDataOceanBaseDeserializationSchema;
import com.ververica.cdc.connectors.oceanbase.table.OceanBaseDeserializationSchema; import org.apache.flink.cdc.connectors.oceanbase.table.OceanBaseDeserializationSchema;
import com.ververica.cdc.connectors.oceanbase.table.StartupMode; import org.apache.flink.cdc.connectors.oceanbase.table.StartupMode;
import java.time.ZoneId; import java.time.ZoneId;
import java.util.Arrays; import java.util.Arrays;

@ -509,10 +509,10 @@ The Oracle CDC connector can also be a DataStream source. There are two modes fo
#### Incremental Snapshot based DataStream (Experimental) #### Incremental Snapshot based DataStream (Experimental)
```java ```java
import com.ververica.cdc.connectors.base.options.StartupOptions; import org.apache.flink.cdc.connectors.base.options.StartupOptions;
import com.ververica.cdc.connectors.base.source.jdbc.JdbcIncrementalSource; import org.apache.flink.cdc.connectors.base.source.jdbc.JdbcIncrementalSource;
import com.ververica.cdc.connectors.oracle.source.OracleSourceBuilder; import org.apache.flink.cdc.connectors.oracle.source.OracleSourceBuilder;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
@ -561,8 +561,8 @@ public class OracleParallelSourceExample {
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.oracle.OracleSource; import org.apache.flink.cdc.connectors.oracle.OracleSource;
public class OracleSourceExample { public class OracleSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -444,10 +444,10 @@ The Postgres CDC connector can also be a DataStream source. There are two modes
#### Incremental Snapshot based DataStream (Experimental) #### Incremental Snapshot based DataStream (Experimental)
```java ```java
import com.ververica.cdc.connectors.base.source.jdbc.JdbcIncrementalSource; import org.apache.flink.cdc.connectors.base.source.jdbc.JdbcIncrementalSource;
import com.ververica.cdc.connectors.postgres.source.PostgresSourceBuilder; import org.apache.flink.cdc.connectors.postgres.source.PostgresSourceBuilder;
import com.ververica.cdc.debezium.DebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.DebeziumDeserializationSchema;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
@ -495,8 +495,8 @@ public class PostgresParallelSourceExample {
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.postgres.PostgreSQLSource; import org.apache.flink.cdc.connectors.postgres.PostgreSQLSource;
public class PostgreSQLSourceExample { public class PostgreSQLSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -342,8 +342,8 @@ The SQLServer CDC connector can also be a DataStream source. You can create a So
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.sqlserver.SqlServerSource; import org.apache.flink.cdc.connectors.sqlserver.SqlServerSource;
public class SqlServerSourceExample { public class SqlServerSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
@ -373,10 +373,10 @@ The SQLServer CDC incremental connector (after 2.4.0) can be used as the followi
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.connectors.base.options.StartupOptions; import org.apache.flink.cdc.connectors.base.options.StartupOptions;
import com.ververica.cdc.connectors.sqlserver.source.SqlServerSourceBuilder; import org.apache.flink.cdc.connectors.sqlserver.source.SqlServerSourceBuilder;
import com.ververica.cdc.connectors.sqlserver.source.SqlServerSourceBuilder.SqlServerIncrementalSource; import org.apache.flink.cdc.connectors.sqlserver.source.SqlServerSourceBuilder.SqlServerIncrementalSource;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
public class SqlServerIncrementalSourceExample { public class SqlServerIncrementalSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -241,10 +241,10 @@ import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import org.apache.flink.util.Collector; import org.apache.flink.util.Collector;
import com.ververica.cdc.connectors.tidb.TDBSourceOptions; import org.apache.flink.cdc.connectors.tidb.TDBSourceOptions;
import com.ververica.cdc.connectors.tidb.TiDBSource; import org.apache.flink.cdc.connectors.tidb.TiDBSource;
import com.ververica.cdc.connectors.tidb.TiKVChangeEventDeserializationSchema; import org.apache.flink.cdc.connectors.tidb.TiKVChangeEventDeserializationSchema;
import com.ververica.cdc.connectors.tidb.TiKVSnapshotEventDeserializationSchema; import org.apache.flink.cdc.connectors.tidb.TiKVSnapshotEventDeserializationSchema;
import org.tikv.kvproto.Cdcpb; import org.tikv.kvproto.Cdcpb;
import org.tikv.kvproto.Kvrpcpb; import org.tikv.kvproto.Kvrpcpb;

@ -224,8 +224,8 @@ The Incremental Reading feature of Vitess CDC Source only exposes in SQL current
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.vitess.VitessSource; import org.apache.flink.cdc.connectors.vitess.VitessSource;
public class VitessSourceExample { public class VitessSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -124,8 +124,8 @@ Include following Maven dependency (available through Maven Central):
```java ```java
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import com.ververica.cdc.connectors.mysql.source.MySqlSource; import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
public class MySqlBinlogSourceExample { public class MySqlBinlogSourceExample {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -182,35 +182,35 @@ flink 1.17.2 flink mysql cdc 2.4.2
<relocation> <relocation>
<pattern>org.apache.kafka</pattern> <pattern>org.apache.kafka</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.org.apache.kafka org.apache.flink.cdc.connectors.shaded.org.apache.kafka
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>org.antlr</pattern> <pattern>org.antlr</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.org.antlr org.apache.flink.cdc.connectors.shaded.org.antlr
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.fasterxml</pattern> <pattern>com.fasterxml</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.com.fasterxml org.apache.flink.cdc.connectors.shaded.com.fasterxml
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.google</pattern> <pattern>com.google</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.com.google org.apache.flink.cdc.connectors.shaded.com.google
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.esri.geometry</pattern> <pattern>com.esri.geometry</pattern>
<shadedPattern>com.ververica.cdc.connectors.shaded.com.esri.geometry</shadedPattern> <shadedPattern>org.apache.flink.cdc.connectors.shaded.com.esri.geometry</shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.zaxxer</pattern> <pattern>com.zaxxer</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.com.zaxxer org.apache.flink.cdc.connectors.shaded.com.zaxxer
</shadedPattern> </shadedPattern>
</relocation> </relocation>
</relocations> </relocations>
@ -233,8 +233,8 @@ package com.ververica.flink.cdc;
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.connectors.mysql.source.MySqlSource; import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
public class CdcTest { public class CdcTest {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -182,35 +182,35 @@ flink 1.17.2 flink mysql cdc 2.4.2
<relocation> <relocation>
<pattern>org.apache.kafka</pattern> <pattern>org.apache.kafka</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.org.apache.kafka org.apache.flink.cdc.connectors.shaded.org.apache.kafka
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>org.antlr</pattern> <pattern>org.antlr</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.org.antlr org.apache.flink.cdc.connectors.shaded.org.antlr
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.fasterxml</pattern> <pattern>com.fasterxml</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.com.fasterxml org.apache.flink.cdc.connectors.shaded.com.fasterxml
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.google</pattern> <pattern>com.google</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.com.google org.apache.flink.cdc.connectors.shaded.com.google
</shadedPattern> </shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.esri.geometry</pattern> <pattern>com.esri.geometry</pattern>
<shadedPattern>com.ververica.cdc.connectors.shaded.com.esri.geometry</shadedPattern> <shadedPattern>org.apache.flink.cdc.connectors.shaded.com.esri.geometry</shadedPattern>
</relocation> </relocation>
<relocation> <relocation>
<pattern>com.zaxxer</pattern> <pattern>com.zaxxer</pattern>
<shadedPattern> <shadedPattern>
com.ververica.cdc.connectors.shaded.com.zaxxer org.apache.flink.cdc.connectors.shaded.com.zaxxer
</shadedPattern> </shadedPattern>
</relocation> </relocation>
</relocations> </relocations>
@ -233,8 +233,8 @@ package com.ververica.flink.cdc;
import org.apache.flink.api.common.eventtime.WatermarkStrategy; import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import com.ververica.cdc.connectors.mysql.source.MySqlSource; import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema; import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
public class CdcTest { public class CdcTest {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {

@ -15,16 +15,16 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli; package org.apache.flink.cdc.cli;
import com.ververica.cdc.cli.parser.PipelineDefinitionParser; import org.apache.flink.cdc.cli.parser.PipelineDefinitionParser;
import com.ververica.cdc.cli.parser.YamlPipelineDefinitionParser; import org.apache.flink.cdc.cli.parser.YamlPipelineDefinitionParser;
import com.ververica.cdc.cli.utils.FlinkEnvironmentUtils; import org.apache.flink.cdc.cli.utils.FlinkEnvironmentUtils;
import com.ververica.cdc.common.annotation.VisibleForTesting; import org.apache.flink.cdc.common.annotation.VisibleForTesting;
import com.ververica.cdc.common.configuration.Configuration; import org.apache.flink.cdc.common.configuration.Configuration;
import com.ververica.cdc.composer.PipelineComposer; import org.apache.flink.cdc.composer.PipelineComposer;
import com.ververica.cdc.composer.PipelineExecution; import org.apache.flink.cdc.composer.PipelineExecution;
import com.ververica.cdc.composer.definition.PipelineDef; import org.apache.flink.cdc.composer.definition.PipelineDef;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.List; import java.util.List;

@ -15,13 +15,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli; package org.apache.flink.cdc.cli;
import org.apache.flink.cdc.cli.utils.ConfigurationUtils;
import org.apache.flink.cdc.cli.utils.FlinkEnvironmentUtils;
import org.apache.flink.cdc.common.annotation.VisibleForTesting;
import org.apache.flink.cdc.common.configuration.Configuration;
import org.apache.flink.cdc.composer.PipelineExecution;
import com.ververica.cdc.cli.utils.ConfigurationUtils;
import com.ververica.cdc.cli.utils.FlinkEnvironmentUtils;
import com.ververica.cdc.common.annotation.VisibleForTesting;
import com.ververica.cdc.common.configuration.Configuration;
import com.ververica.cdc.composer.PipelineExecution;
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.DefaultParser;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli; package org.apache.flink.cdc.cli;
import org.apache.commons.cli.Option; import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options; import org.apache.commons.cli.Options;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli.parser; package org.apache.flink.cdc.cli.parser;
import com.ververica.cdc.common.configuration.Configuration; import org.apache.flink.cdc.common.configuration.Configuration;
import com.ververica.cdc.composer.definition.PipelineDef; import org.apache.flink.cdc.composer.definition.PipelineDef;
import java.nio.file.Path; import java.nio.file.Path;

@ -15,26 +15,26 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli.parser; package org.apache.flink.cdc.cli.parser;
import org.apache.flink.cdc.common.configuration.Configuration;
import org.apache.flink.cdc.composer.definition.PipelineDef;
import org.apache.flink.cdc.composer.definition.RouteDef;
import org.apache.flink.cdc.composer.definition.SinkDef;
import org.apache.flink.cdc.composer.definition.SourceDef;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.ververica.cdc.common.configuration.Configuration;
import com.ververica.cdc.composer.definition.PipelineDef;
import com.ververica.cdc.composer.definition.RouteDef;
import com.ververica.cdc.composer.definition.SinkDef;
import com.ververica.cdc.composer.definition.SourceDef;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import static com.ververica.cdc.common.utils.Preconditions.checkNotNull; import static org.apache.flink.cdc.common.utils.Preconditions.checkNotNull;
/** Parser for converting YAML formatted pipeline definition to {@link PipelineDef}. */ /** Parser for converting YAML formatted pipeline definition to {@link PipelineDef}. */
public class YamlPipelineDefinitionParser implements PipelineDefinitionParser { public class YamlPipelineDefinitionParser implements PipelineDefinitionParser {

@ -15,14 +15,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli.utils; package org.apache.flink.cdc.cli.utils;
import org.apache.flink.cdc.common.configuration.Configuration;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.type.TypeReference;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.ververica.cdc.common.configuration.Configuration;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli.utils; package org.apache.flink.cdc.cli.utils;
import com.ververica.cdc.common.configuration.Configuration; import org.apache.flink.cdc.common.configuration.Configuration;
import com.ververica.cdc.composer.flink.FlinkPipelineComposer; import org.apache.flink.cdc.composer.flink.FlinkPipelineComposer;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.List; import java.util.List;

@ -15,13 +15,14 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli; package org.apache.flink.cdc.cli;
import org.apache.flink.cdc.composer.PipelineComposer;
import org.apache.flink.cdc.composer.PipelineExecution;
import org.apache.flink.cdc.composer.definition.PipelineDef;
import org.apache.flink.shaded.guava31.com.google.common.io.Resources; import org.apache.flink.shaded.guava31.com.google.common.io.Resources;
import com.ververica.cdc.composer.PipelineComposer;
import com.ververica.cdc.composer.PipelineExecution;
import com.ververica.cdc.composer.definition.PipelineDef;
import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.Options; import org.apache.commons.cli.Options;

@ -15,16 +15,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.cli.parser; package org.apache.flink.cdc.cli.parser;
import org.apache.flink.cdc.common.configuration.Configuration;
import org.apache.flink.cdc.composer.definition.PipelineDef;
import org.apache.flink.cdc.composer.definition.RouteDef;
import org.apache.flink.cdc.composer.definition.SinkDef;
import org.apache.flink.cdc.composer.definition.SourceDef;
import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableMap; import org.apache.flink.shaded.guava31.com.google.common.collect.ImmutableMap;
import org.apache.flink.shaded.guava31.com.google.common.io.Resources; import org.apache.flink.shaded.guava31.com.google.common.io.Resources;
import com.ververica.cdc.common.configuration.Configuration;
import com.ververica.cdc.composer.definition.PipelineDef;
import com.ververica.cdc.composer.definition.RouteDef;
import com.ververica.cdc.composer.definition.SinkDef;
import com.ververica.cdc.composer.definition.SourceDef;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import java.net.URL; import java.net.URL;
@ -32,11 +33,11 @@ import java.nio.file.Paths;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import static com.ververica.cdc.common.pipeline.PipelineOptions.PIPELINE_LOCAL_TIME_ZONE; import static org.apache.flink.cdc.common.pipeline.PipelineOptions.PIPELINE_LOCAL_TIME_ZONE;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
/** Unit test for {@link YamlPipelineDefinitionParser}. */ /** Unit test for {@link org.apache.flink.cdc.cli.parser.YamlPipelineDefinitionParser}. */
class YamlPipelineDefinitionParserTest { class YamlPipelineDefinitionParserTest {
@Test @Test

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.annotation; package org.apache.flink.cdc.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.annotation; package org.apache.flink.cdc.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.annotation; package org.apache.flink.cdc.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.annotation; package org.apache.flink.cdc.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.annotation; package org.apache.flink.cdc.common.annotation;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;

@ -15,17 +15,16 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration; package org.apache.flink.cdc.common.configuration;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.configuration.description.Description; import org.apache.flink.cdc.common.configuration.description.Description;
import org.apache.flink.cdc.common.utils.Preconditions;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.stream.Stream; import java.util.stream.Stream;
import static com.ververica.cdc.common.utils.Preconditions.checkNotNull;
/** /**
* A {@code ConfigOption} describes a configuration parameter. It encapsulates the configuration * A {@code ConfigOption} describes a configuration parameter. It encapsulates the configuration
* key, deprecated older versions of the key, and an optional default value for the configuration * key, deprecated older versions of the key, and an optional default value for the configuration
@ -98,11 +97,11 @@ public class ConfigOption<T> {
T defaultValue, T defaultValue,
boolean isList, boolean isList,
FallbackKey... fallbackKeys) { FallbackKey... fallbackKeys) {
this.key = checkNotNull(key); this.key = Preconditions.checkNotNull(key);
this.description = description; this.description = description;
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
this.fallbackKeys = fallbackKeys == null || fallbackKeys.length == 0 ? EMPTY : fallbackKeys; this.fallbackKeys = fallbackKeys == null || fallbackKeys.length == 0 ? EMPTY : fallbackKeys;
this.clazz = checkNotNull(clazz); this.clazz = Preconditions.checkNotNull(clazz);
this.isList = isList; this.isList = isList;
} }

@ -15,18 +15,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration; package org.apache.flink.cdc.common.configuration;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.configuration.description.Description; import org.apache.flink.cdc.common.configuration.description.Description;
import org.apache.flink.cdc.common.utils.Preconditions;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static com.ververica.cdc.common.utils.Preconditions.checkNotNull;
/** /**
* {@code ConfigOptions} are used to build a {@link ConfigOption}. The option is typically built in * {@code ConfigOptions} are used to build a {@link ConfigOption}. The option is typically built in
* one of the following pattern: * one of the following pattern:
@ -75,7 +74,7 @@ public class ConfigOptions {
* @return The builder for the config option with the given key. * @return The builder for the config option with the given key.
*/ */
public static OptionBuilder key(String key) { public static OptionBuilder key(String key) {
checkNotNull(key); Preconditions.checkNotNull(key);
return new OptionBuilder(key); return new OptionBuilder(key);
} }

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration; package org.apache.flink.cdc.common.configuration;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -26,10 +26,10 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.function.BiFunction; import java.util.function.BiFunction;
import static com.ververica.cdc.common.configuration.ConfigurationUtils.canBePrefixMap; import static org.apache.flink.cdc.common.configuration.ConfigurationUtils.canBePrefixMap;
import static com.ververica.cdc.common.configuration.ConfigurationUtils.containsPrefixMap; import static org.apache.flink.cdc.common.configuration.ConfigurationUtils.containsPrefixMap;
import static com.ververica.cdc.common.configuration.ConfigurationUtils.convertToPropertiesPrefixed; import static org.apache.flink.cdc.common.configuration.ConfigurationUtils.convertToPropertiesPrefixed;
import static com.ververica.cdc.common.configuration.ConfigurationUtils.removePrefixMap; import static org.apache.flink.cdc.common.configuration.ConfigurationUtils.removePrefixMap;
/** Lightweight configuration object which stores key/value pairs. */ /** Lightweight configuration object which stores key/value pairs. */
public class Configuration implements java.io.Serializable, Cloneable { public class Configuration implements java.io.Serializable, Cloneable {

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration; package org.apache.flink.cdc.common.configuration;
import com.ververica.cdc.common.utils.TimeUtils; import org.apache.flink.cdc.common.utils.TimeUtils;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
@ -26,8 +26,6 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.ververica.cdc.common.configuration.StructuredOptionsSplitter.escapeWithSingleQuote;
/** Utility class for {@link Configuration} related helper functions. */ /** Utility class for {@link Configuration} related helper functions. */
public class ConfigurationUtils { public class ConfigurationUtils {
@ -140,7 +138,10 @@ public class ConfigurationUtils {
} else if (o instanceof List) { } else if (o instanceof List) {
return ((List<?>) o) return ((List<?>) o)
.stream() .stream()
.map(e -> escapeWithSingleQuote(convertToString(e), ";")) .map(
e ->
StructuredOptionsSplitter.escapeWithSingleQuote(
convertToString(e), ";"))
.collect(Collectors.joining(";")); .collect(Collectors.joining(";"));
} else if (o instanceof Map) { } else if (o instanceof Map) {
return ((Map<?, ?>) o) return ((Map<?, ?>) o)
@ -148,11 +149,13 @@ public class ConfigurationUtils {
.map( .map(
e -> { e -> {
String escapedKey = String escapedKey =
escapeWithSingleQuote(e.getKey().toString(), ":"); StructuredOptionsSplitter.escapeWithSingleQuote(
e.getKey().toString(), ":");
String escapedValue = String escapedValue =
escapeWithSingleQuote(e.getValue().toString(), ":"); StructuredOptionsSplitter.escapeWithSingleQuote(
e.getValue().toString(), ":");
return escapeWithSingleQuote( return StructuredOptionsSplitter.escapeWithSingleQuote(
escapedKey + ":" + escapedValue, ","); escapedKey + ":" + escapedValue, ",");
}) })
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration; package org.apache.flink.cdc.common.configuration;
/** A key with FallbackKeys will fall back to the FallbackKeys if it itself is not configured. */ /** A key with FallbackKeys will fall back to the FallbackKeys if it itself is not configured. */
public class FallbackKey { public class FallbackKey {

@ -15,16 +15,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration; package org.apache.flink.cdc.common.configuration;
import com.ververica.cdc.common.annotation.Internal; import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.cdc.common.utils.Preconditions;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import static com.ververica.cdc.common.utils.Preconditions.checkNotNull;
/** Helper class for splitting a string on a given delimiter with quoting logic. */ /** Helper class for splitting a string on a given delimiter with quoting logic. */
@Internal @Internal
class StructuredOptionsSplitter { class StructuredOptionsSplitter {
@ -48,7 +47,7 @@ class StructuredOptionsSplitter {
* @return a list of splits * @return a list of splits
*/ */
static List<String> splitEscaped(String string, char delimiter) { static List<String> splitEscaped(String string, char delimiter) {
List<Token> tokens = tokenize(checkNotNull(string), delimiter); List<Token> tokens = tokenize(Preconditions.checkNotNull(string), delimiter);
return processTokens(tokens); return processTokens(tokens);
} }

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** Part of description that represents a block e.g. some text, linebreak or a list. */ /** Part of description that represents a block e.g. some text, linebreak or a list. */
@PublicEvolving @PublicEvolving

@ -15,17 +15,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import org.apache.flink.cdc.common.configuration.ConfigOption;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /** Description for {@link ConfigOption}. Allows providing multiple rich formats. */
* Description for {@link com.ververica.cdc.common.configuration.ConfigOption}. Allows providing
* multiple rich formats.
*/
@PublicEvolving @PublicEvolving
public class Description { public class Description {

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** Part of a {@link Description} that can be converted into String representation. */ /** Part of a {@link Description} that can be converted into String representation. */
@PublicEvolving @PublicEvolving

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import java.util.EnumSet; import java.util.EnumSet;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import java.util.EnumSet; import java.util.EnumSet;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** Part of description that represents an element inside a block e.g. a link. */ /** Part of description that represents an element inside a block e.g. a link. */
@PublicEvolving @PublicEvolving

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** Represents a line break in the {@link Description}. */ /** Represents a line break in the {@link Description}. */
@PublicEvolving @PublicEvolving

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** Element that represents a link in the {@link Description}. */ /** Element that represents a link in the {@link Description}. */
@PublicEvolving @PublicEvolving

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.configuration.description; package org.apache.flink.cdc.common.configuration.description;
import org.apache.flink.shaded.guava31.com.google.common.base.Strings; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.shaded.guava31.com.google.common.base.Strings;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;

@ -15,19 +15,19 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.ArrayType; import org.apache.flink.cdc.common.types.ArrayType;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.Serializable; import java.io.Serializable;
import static com.ververica.cdc.common.types.DataTypeChecks.getFieldCount; import static org.apache.flink.cdc.common.types.DataTypeChecks.getFieldCount;
import static com.ververica.cdc.common.types.DataTypeChecks.getPrecision; import static org.apache.flink.cdc.common.types.DataTypeChecks.getPrecision;
import static com.ververica.cdc.common.types.DataTypeChecks.getScale; import static org.apache.flink.cdc.common.types.DataTypeChecks.getScale;
/** /**
* Base interface of an internal data structure representing data of {@link ArrayType}. * Base interface of an internal data structure representing data of {@link ArrayType}.

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.DecimalType; import org.apache.flink.cdc.common.types.DecimalType;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -27,7 +27,7 @@ import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import java.math.RoundingMode; import java.math.RoundingMode;
import static com.ververica.cdc.common.utils.Preconditions.checkArgument; import static org.apache.flink.cdc.common.utils.Preconditions.checkArgument;
/** /**
* An internal data structure representing data of {@link DecimalType}. * An internal data structure representing data of {@link DecimalType}.

@ -15,10 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import org.apache.flink.cdc.common.types.ArrayType;
import com.ververica.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.ArrayType;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import java.util.Arrays; import java.util.Arrays;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.MapType; import org.apache.flink.cdc.common.types.MapType;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.LocalZonedTimestampType; import org.apache.flink.cdc.common.types.LocalZonedTimestampType;
import com.ververica.cdc.common.utils.Preconditions; import org.apache.flink.cdc.common.utils.Preconditions;
import java.time.Instant; import java.time.Instant;
import java.time.LocalDate; import java.time.LocalDate;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.MapType; import org.apache.flink.cdc.common.types.MapType;
/** /**
* Base interface of an internal data structure representing data of {@link MapType}. * Base interface of an internal data structure representing data of {@link MapType}.

@ -15,18 +15,18 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.Serializable; import java.io.Serializable;
import static com.ververica.cdc.common.types.DataTypeChecks.getFieldCount; import static org.apache.flink.cdc.common.types.DataTypeChecks.getFieldCount;
import static com.ververica.cdc.common.types.DataTypeChecks.getPrecision; import static org.apache.flink.cdc.common.types.DataTypeChecks.getPrecision;
import static com.ververica.cdc.common.types.DataTypeChecks.getScale; import static org.apache.flink.cdc.common.types.DataTypeChecks.getScale;
/** /**
* Class {@code RecordData} describes the data of changed record (i.e. row) in the external system. * Class {@code RecordData} describes the data of changed record (i.e. row) in the external system.

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.CharType; import org.apache.flink.cdc.common.types.CharType;
import com.ververica.cdc.common.types.VarCharType; import org.apache.flink.cdc.common.types.VarCharType;
/** An internal data structure representing data of {@link CharType} and {@link VarCharType}. */ /** An internal data structure representing data of {@link CharType} and {@link VarCharType}. */
@PublicEvolving @PublicEvolving

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.TimestampType; import org.apache.flink.cdc.common.types.TimestampType;
import com.ververica.cdc.common.utils.Preconditions; import org.apache.flink.cdc.common.utils.Preconditions;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.time.LocalDate; import java.time.LocalDate;

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data; package org.apache.flink.cdc.common.data;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.ZonedTimestampType; import org.apache.flink.cdc.common.types.ZonedTimestampType;
import com.ververica.cdc.common.utils.Preconditions; import org.apache.flink.cdc.common.utils.Preconditions;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.time.Instant; import java.time.Instant;

@ -15,12 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import com.ververica.cdc.common.annotation.Internal;
/** Binary format spanning {@link MemorySegment}s. */ /** Binary format spanning {@link MemorySegment}s. */
@Internal @Internal
public interface BinaryFormat { public interface BinaryFormat {

@ -15,31 +15,29 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.cdc.common.data.ArrayData;
import org.apache.flink.cdc.common.data.DecimalData;
import org.apache.flink.cdc.common.data.LocalZonedTimestampData;
import org.apache.flink.cdc.common.data.MapData;
import org.apache.flink.cdc.common.data.RecordData;
import org.apache.flink.cdc.common.data.StringData;
import org.apache.flink.cdc.common.data.TimestampData;
import org.apache.flink.cdc.common.data.ZonedTimestampData;
import org.apache.flink.cdc.common.types.DataType;
import org.apache.flink.cdc.common.types.DataTypeRoot;
import org.apache.flink.cdc.common.types.DecimalType;
import org.apache.flink.cdc.common.types.LocalZonedTimestampType;
import org.apache.flink.cdc.common.types.TimestampType;
import org.apache.flink.cdc.common.types.ZonedTimestampType;
import org.apache.flink.cdc.common.utils.Preconditions;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import org.apache.flink.core.memory.MemorySegmentFactory; import org.apache.flink.core.memory.MemorySegmentFactory;
import com.ververica.cdc.common.annotation.Internal;
import com.ververica.cdc.common.data.ArrayData;
import com.ververica.cdc.common.data.DecimalData;
import com.ververica.cdc.common.data.LocalZonedTimestampData;
import com.ververica.cdc.common.data.MapData;
import com.ververica.cdc.common.data.RecordData;
import com.ververica.cdc.common.data.StringData;
import com.ververica.cdc.common.data.TimestampData;
import com.ververica.cdc.common.data.ZonedTimestampData;
import com.ververica.cdc.common.types.DataType;
import com.ververica.cdc.common.types.DecimalType;
import com.ververica.cdc.common.types.LocalZonedTimestampType;
import com.ververica.cdc.common.types.TimestampType;
import com.ververica.cdc.common.types.ZonedTimestampType;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import static com.ververica.cdc.common.types.DataTypeRoot.DECIMAL;
import static com.ververica.cdc.common.utils.Preconditions.checkArgument;
/** /**
* An implementation of {@link RecordData} which is backed by {@link MemorySegment} instead of * An implementation of {@link RecordData} which is backed by {@link MemorySegment} instead of
* Object. It can significantly reduce the serialization/deserialization of Java objects. * Object. It can significantly reduce the serialization/deserialization of Java objects.
@ -110,14 +108,14 @@ public final class BinaryRecordData extends BinarySection implements RecordData,
} }
public static boolean isMutable(DataType type) { public static boolean isMutable(DataType type) {
return isInFixedLengthPart(type) || type.getTypeRoot() == DECIMAL; return isInFixedLengthPart(type) || type.getTypeRoot() == DataTypeRoot.DECIMAL;
} }
private final int arity; private final int arity;
private final int nullBitsSizeInBytes; private final int nullBitsSizeInBytes;
public BinaryRecordData(int arity) { public BinaryRecordData(int arity) {
checkArgument(arity >= 0); Preconditions.checkArgument(arity >= 0);
this.arity = arity; this.arity = arity;
this.nullBitsSizeInBytes = calculateBitSetWidthInBytes(arity); this.nullBitsSizeInBytes = calculateBitSetWidthInBytes(arity);
} }

@ -15,13 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.cdc.common.utils.Preconditions;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import com.ververica.cdc.common.annotation.Internal;
import com.ververica.cdc.common.utils.Preconditions;
/** A basic implementation of {@link BinaryFormat} which describe a section of memory. */ /** A basic implementation of {@link BinaryFormat} which describe a section of memory. */
@Internal @Internal
public class BinarySection implements BinaryFormat { public class BinarySection implements BinaryFormat {

@ -15,23 +15,22 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.cdc.common.data.DecimalData;
import org.apache.flink.cdc.common.data.LocalZonedTimestampData;
import org.apache.flink.cdc.common.data.RecordData;
import org.apache.flink.cdc.common.data.StringData;
import org.apache.flink.cdc.common.data.TimestampData;
import org.apache.flink.core.memory.DataOutputView; import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import com.ververica.cdc.common.annotation.Internal;
import com.ververica.cdc.common.data.DecimalData;
import com.ververica.cdc.common.data.LocalZonedTimestampData;
import com.ververica.cdc.common.data.RecordData;
import com.ververica.cdc.common.data.StringData;
import com.ververica.cdc.common.data.TimestampData;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import static com.ververica.cdc.common.data.binary.BinaryFormat.HIGHEST_FIRST_BIT; import static org.apache.flink.cdc.common.data.binary.BinaryFormat.HIGHEST_FIRST_BIT;
import static com.ververica.cdc.common.data.binary.BinaryFormat.HIGHEST_SECOND_TO_EIGHTH_BIT; import static org.apache.flink.cdc.common.data.binary.BinaryFormat.HIGHEST_SECOND_TO_EIGHTH_BIT;
import static org.apache.flink.core.memory.MemoryUtils.UNSAFE; import static org.apache.flink.core.memory.MemoryUtils.UNSAFE;
/** Utilities for binary data segments which heavily uses {@link MemorySegment}. */ /** Utilities for binary data segments which heavily uses {@link MemorySegment}. */

@ -15,23 +15,20 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.cdc.common.data.StringData;
import org.apache.flink.cdc.common.utils.Preconditions;
import org.apache.flink.cdc.common.utils.StringUtf8Utils;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import org.apache.flink.core.memory.MemorySegmentFactory; import org.apache.flink.core.memory.MemorySegmentFactory;
import com.ververica.cdc.common.annotation.Internal;
import com.ververica.cdc.common.data.StringData;
import com.ververica.cdc.common.utils.StringUtf8Utils;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.Arrays; import java.util.Arrays;
import static com.ververica.cdc.common.data.binary.BinarySegmentUtils.getBytes;
import static com.ververica.cdc.common.utils.Preconditions.checkArgument;
/** /**
* A lazily binary implementation of {@link StringData} which is backed by {@link MemorySegment}s * A lazily binary implementation of {@link StringData} which is backed by {@link MemorySegment}s
* and {@link String}. * and {@link String}.
@ -111,7 +108,8 @@ public final class BinaryStringData extends LazyBinaryFormat<String> implements
@Override @Override
public byte[] toBytes() { public byte[] toBytes() {
ensureMaterialized(); ensureMaterialized();
return getBytes(binarySection.segments, binarySection.offset, binarySection.sizeInBytes); return BinarySegmentUtils.getBytes(
binarySection.segments, binarySection.offset, binarySection.sizeInBytes);
} }
@Override @Override
@ -261,7 +259,7 @@ public final class BinaryStringData extends LazyBinaryFormat<String> implements
needCompare = Math.min(Math.min(sizeOfFirst1, sizeOfFirst2), len); needCompare = Math.min(Math.min(sizeOfFirst1, sizeOfFirst2), len);
} }
checkArgument(needCompare == len); Preconditions.checkArgument(needCompare == len);
return binarySection.sizeInBytes - other.binarySection.sizeInBytes; return binarySection.sizeInBytes - other.binarySection.sizeInBytes;
} }

@ -15,13 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import com.ververica.cdc.common.annotation.Internal;
import java.io.IOException; import java.io.IOException;
/** /**

@ -15,12 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import org.apache.flink.cdc.common.annotation.Internal;
import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.core.memory.MemorySegment;
import com.ververica.cdc.common.annotation.Internal;
import static org.apache.flink.core.memory.MemoryUtils.UNSAFE; import static org.apache.flink.core.memory.MemoryUtils.UNSAFE;
/** Murmur Hash. This is inspired by Guava's Murmur3_32HashFunction. */ /** Murmur Hash. This is inspired by Guava's Murmur3_32HashFunction. */

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.data.binary; package org.apache.flink.cdc.common.data.binary;
import com.ververica.cdc.common.annotation.Internal; import org.apache.flink.cdc.common.annotation.Internal;
/** Provides null related getters. */ /** Provides null related getters. */
@Internal @Internal

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.schema.Column; import org.apache.flink.cdc.common.schema.Column;
import javax.annotation.Nullable; import javax.annotation.Nullable;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** /**
* Class {@code ChangeEvent} represents the change events of external systems, including {@link * Class {@code ChangeEvent} represents the change events of external systems, including {@link

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.schema.Schema; import org.apache.flink.cdc.common.schema.Schema;
import com.ververica.cdc.common.source.DataSource; import org.apache.flink.cdc.common.source.DataSource;
import java.util.Objects; import java.util.Objects;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.data.RecordData; import org.apache.flink.cdc.common.data.RecordData;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections; import java.util.Collections;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** /**
* Class {@code Event} is the super interface defines the events of external systems flowing into * Class {@code Event} is the super interface defines the events of external systems flowing into

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import java.util.Objects; import java.util.Objects;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** /**
* Enum {@code OperationType} describes the type of operation that the data change event reports. * Enum {@code OperationType} describes the type of operation that the data change event reports.

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import java.io.Serializable; import java.io.Serializable;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.event; package org.apache.flink.cdc.common.event;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import javax.annotation.Nullable; import javax.annotation.Nullable;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.factories; package org.apache.flink.cdc.common.factories;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.sink.DataSink; import org.apache.flink.cdc.common.sink.DataSink;
/** /**
* A factory to create {@link DataSink} instances. See also {@link Factory} for more information. * A factory to create {@link DataSink} instances. See also {@link Factory} for more information.

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.factories; package org.apache.flink.cdc.common.factories;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.source.DataSource; import org.apache.flink.cdc.common.source.DataSource;
/** /**
* A factory to create {@link DataSource} instances. See also {@link Factory} for more information. * A factory to create {@link DataSource} instances. See also {@link Factory} for more information.

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.factories; package org.apache.flink.cdc.common.factories;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.configuration.ConfigOption; import org.apache.flink.cdc.common.configuration.ConfigOption;
import com.ververica.cdc.common.configuration.Configuration; import org.apache.flink.cdc.common.configuration.Configuration;
import java.util.Set; import java.util.Set;
@ -30,8 +30,8 @@ import java.util.Set;
* <p>A factory is uniquely identified by {@link Class} and {@link #identifier()}. * <p>A factory is uniquely identified by {@link Class} and {@link #identifier()}.
* *
* <p>The list of available factories is discovered using Java's Service Provider Interfaces (SPI). * <p>The list of available factories is discovered using Java's Service Provider Interfaces (SPI).
* Classes that implement this interface can be added to {@code * Classes that implement this interface can be added to {@code META_INF/services/Factory} in JAR
* META_INF/services/com.ververica.cdc.common.factories.Factory} in JAR files. * files.
* *
* <p>Every factory declares a set of required and optional options. This information will not be * <p>Every factory declares a set of required and optional options. This information will not be
* used during discovery but is helpful when generating documentation and performing validation. A * used during discovery but is helpful when generating documentation and performing validation. A

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.factories; package org.apache.flink.cdc.common.factories;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.configuration.Configuration; import org.apache.flink.cdc.common.configuration.Configuration;
/** A helper for working with {@link Factory}. */ /** A helper for working with {@link Factory}. */
@PublicEvolving @PublicEvolving

@ -15,15 +15,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.pipeline; package org.apache.flink.cdc.common.pipeline;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.configuration.ConfigOption; import org.apache.flink.cdc.common.configuration.ConfigOption;
import com.ververica.cdc.common.configuration.ConfigOptions; import org.apache.flink.cdc.common.configuration.ConfigOptions;
import com.ververica.cdc.common.configuration.description.Description; import org.apache.flink.cdc.common.configuration.description.Description;
import com.ververica.cdc.common.configuration.description.ListElement; import org.apache.flink.cdc.common.configuration.description.ListElement;
import static com.ververica.cdc.common.configuration.description.TextElement.text; import static org.apache.flink.cdc.common.configuration.description.TextElement.text;
/** Predefined pipeline configuration options. */ /** Predefined pipeline configuration options. */
@PublicEvolving @PublicEvolving

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.pipeline; package org.apache.flink.cdc.common.pipeline;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** Behavior for handling schema changes. */ /** Behavior for handling schema changes. */
@PublicEvolving @PublicEvolving

@ -15,18 +15,18 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.schema; package org.apache.flink.cdc.common.schema;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
import static com.ververica.cdc.common.utils.EncodingUtils.escapeIdentifier; import static org.apache.flink.cdc.common.utils.EncodingUtils.escapeIdentifier;
import static com.ververica.cdc.common.utils.EncodingUtils.escapeSingleQuotes; import static org.apache.flink.cdc.common.utils.EncodingUtils.escapeSingleQuotes;
/** /**
* Representation of a column in a {@link Schema}. * Representation of a column in a {@link Schema}.

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.schema; package org.apache.flink.cdc.common.schema;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import javax.annotation.Nullable; import javax.annotation.Nullable;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.schema; package org.apache.flink.cdc.common.schema;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import javax.annotation.Nullable; import javax.annotation.Nullable;

@ -15,15 +15,15 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.schema; package org.apache.flink.cdc.common.schema;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.types.DataField; import org.apache.flink.cdc.common.types.DataField;
import com.ververica.cdc.common.types.DataType; import org.apache.flink.cdc.common.types.DataType;
import com.ververica.cdc.common.types.DataTypeRoot; import org.apache.flink.cdc.common.types.DataTypeRoot;
import com.ververica.cdc.common.types.DataTypes; import org.apache.flink.cdc.common.types.DataTypes;
import com.ververica.cdc.common.types.RowType; import org.apache.flink.cdc.common.types.RowType;
import com.ververica.cdc.common.utils.Preconditions; import org.apache.flink.cdc.common.utils.Preconditions;
import javax.annotation.Nullable; import javax.annotation.Nullable;

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.schema; package org.apache.flink.cdc.common.schema;
import com.ververica.cdc.common.event.TableId; import org.apache.flink.cdc.common.event.TableId;
import com.ververica.cdc.common.utils.Predicates; import org.apache.flink.cdc.common.utils.Predicates;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.schema; package org.apache.flink.cdc.common.schema;
import com.ververica.cdc.common.event.TableId; import org.apache.flink.cdc.common.event.TableId;
import java.util.function.Predicate; import java.util.function.Predicate;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.sink; package org.apache.flink.cdc.common.sink;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** /**
* {@code DataSink} is used to write change data to external system and apply metadata changes to * {@code DataSink} is used to write change data to external system and apply metadata changes to

@ -15,13 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.sink; package org.apache.flink.cdc.common.sink;
import org.apache.flink.api.connector.sink2.Sink; import org.apache.flink.api.connector.sink2.Sink;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import org.apache.flink.streaming.api.functions.sink.SinkFunction; import org.apache.flink.streaming.api.functions.sink.SinkFunction;
import com.ververica.cdc.common.annotation.PublicEvolving;
/** /**
* A marker interface used to provide an event sink for writing change events to external systems. * A marker interface used to provide an event sink for writing change events to external systems.
* We can reuse exiting Flink {@link Sink} and Flink {@link SinkFunction} implementation, and we can * We can reuse exiting Flink {@link Sink} and Flink {@link SinkFunction} implementation, and we can

@ -15,13 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.sink; package org.apache.flink.cdc.common.sink;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import org.apache.flink.cdc.common.event.Event;
import org.apache.flink.streaming.api.functions.sink.SinkFunction; import org.apache.flink.streaming.api.functions.sink.SinkFunction;
import com.ververica.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.event.Event;
/** /**
* {@code FlinkSinkFunctionProvider} is used to provide a Flink {@link SinkFunction} for writing * {@code FlinkSinkFunctionProvider} is used to provide a Flink {@link SinkFunction} for writing
* events to external systems. * events to external systems.

@ -15,12 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.sink; package org.apache.flink.cdc.common.sink;
import org.apache.flink.api.connector.sink2.Sink; import org.apache.flink.api.connector.sink2.Sink;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.event.Event;
import com.ververica.cdc.common.event.Event;
/** /**
* {@code FlinkSinkProvider} is used to provide a Flink {@link Sink} for writing events to external * {@code FlinkSinkProvider} is used to provide a Flink {@link Sink} for writing events to external

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.sink; package org.apache.flink.cdc.common.sink;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.event.SchemaChangeEvent; import org.apache.flink.cdc.common.event.SchemaChangeEvent;
import java.io.Serializable; import java.io.Serializable;

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.source; package org.apache.flink.cdc.common.source;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
/** /**
* {@code DataSource} is used to access metadata and read change data from external systems. It can * {@code DataSource} is used to access metadata and read change data from external systems. It can

@ -15,13 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.source; package org.apache.flink.cdc.common.source;
import org.apache.flink.api.connector.source.Source; import org.apache.flink.api.connector.source.Source;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.common.annotation.PublicEvolving;
/** /**
* A marker interface used to provide an event source for reading events from external systems. We * A marker interface used to provide an event source for reading events from external systems. We
* can reuse exiting Flink {@link Source} and Flink {@link SourceFunction} implementation, and we * can reuse exiting Flink {@link Source} and Flink {@link SourceFunction} implementation, and we

@ -15,13 +15,12 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.source; package org.apache.flink.cdc.common.source;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import org.apache.flink.cdc.common.event.Event;
import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceFunction;
import com.ververica.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.event.Event;
/** /**
* {@code FlinkSourceFunctionProvider} is used to provide a Flink {@link SourceFunction} for reading * {@code FlinkSourceFunctionProvider} is used to provide a Flink {@link SourceFunction} for reading
* events from external systems. * events from external systems.

@ -15,12 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.source; package org.apache.flink.cdc.common.source;
import org.apache.flink.api.connector.source.Source; import org.apache.flink.api.connector.source.Source;
import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.event.Event;
import com.ververica.cdc.common.event.Event;
/** /**
* {@code FlinkSourceProvider} is used to provide a Flink {@link Source} for reading events from * {@code FlinkSourceProvider} is used to provide a Flink {@link Source} for reading events from

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.source; package org.apache.flink.cdc.common.source;
import com.ververica.cdc.common.annotation.PublicEvolving; import org.apache.flink.cdc.common.annotation.PublicEvolving;
import com.ververica.cdc.common.event.TableId; import org.apache.flink.cdc.common.event.TableId;
import com.ververica.cdc.common.schema.Schema; import org.apache.flink.cdc.common.schema.Schema;
import javax.annotation.Nullable; import javax.annotation.Nullable;

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.ververica.cdc.common.text; package org.apache.flink.cdc.common.text;
/** An exception representing a problem during parsing of text. */ /** An exception representing a problem during parsing of text. */
public class ParsingException extends RuntimeException { public class ParsingException extends RuntimeException {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save