Skip to content

Commit

Permalink
add supporting files for e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterZh6 committed Nov 13, 2024
1 parent 686274d commit b3a79d6
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,42 @@
<type>jar</type>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-connector-kafka-v1.18</artifactId>
<version>${project.version}</version>
<destFileName>sort-connector-kafka.jar</destFileName>
<type>jar</type>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
</artifactItem>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.jdbc.version}</version>
<destFileName>mysql-driver.jar</destFileName>
<type>jar</type>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
</dependency>
<!-- temporary dependency for kafka end2end tests, generated from v1.15 START-->
<!-- REMOVE THIS WHEN THE CORRESPONDING CONNECTORS FOR 1.18 ARE FINISHED-->
<artifactItem>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-connector-mysql-cdc-v1.15</artifactId>
<version>${project.version}</version>
<destFileName>sort-connector-mysql-cdc.jar</destFileName>
<type>jar</type>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-connector-starrocks-v1.15</artifactId>
<version>${project.version}</version>
<destFileName>sort-connector-starrocks.jar</destFileName>
<type>jar</type>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
</artifactItem>
<!-- temporary dependency for kafka end2end tests, generated from v1.15 END-->

</artifactItems>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kafka-topics --create --topic ${TOPIC} --replication-factor 1 --partitions 1 --zookeeper localhost:${ZOOKEEPER_PORT}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
CREATE TABLE test_input (
`id` INT primary key,
name STRING,
description STRING
) WITH (
'connector' = 'mysql-cdc-inlong',
'hostname' = 'mysql',
'port' = '3306',
'username' = 'root',
'password' = 'inlong',
'database-name' = 'test',
'table-name' = 'test_input',
'scan.incremental.snapshot.enabled' = 'false',
'jdbc.properties.useSSL' = 'false',
'jdbc.properties.allowPublicKeyRetrieval' = 'true'
);

CREATE TABLE kafka_load (
`id` INT NOT NULL primary key,
name STRING,
description STRING
) WITH (
'connector' = 'upsert-kafka-inlong',
'topic' = 'test-topic',
'properties.bootstrap.servers' = 'kafka:9092',
'key.format' = 'csv',
'value.format' = 'csv'
);

CREATE TABLE kafka_extract (
`id` INT NOT NULL,
name STRING,
description STRING
) WITH (
'connector' = 'kafka-inlong',
'topic' = 'test-topic',
'properties.bootstrap.servers' = 'kafka:9092',
'properties.group.id' = 'testGroup',
'scan.startup.mode' = 'earliest-offset',
'format' = 'csv'
);

CREATE TABLE test_output (
`id` INT primary key,
name STRING,
description STRING
) WITH (
'connector' = 'starrocks-inlong',
'jdbc-url' = 'jdbc:mysql://starrocks:9030',
'load-url'='starrocks:8030',
'database-name'='test',
'table-name' = 'test_output1',
'username' = 'inlong',
'password' = 'inlong',
'sink.properties.format' = 'json',
'sink.properties.strip_outer_array' = 'true',
'sink.buffer-flush.interval-ms' = '1000'
);

INSERT INTO kafka_load select * from test_input;
INSERT INTO test_output select * from kafka_extract;

0 comments on commit b3a79d6

Please sign in to comment.