You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhuangchong (via GitHub)" <gi...@apache.org> on 2024/08/21 06:19:51 UTC
[PR] [cdc] Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat [paimon]
zhuangchong opened a new pull request, #4024:
URL: https://github.com/apache/paimon/pull/4024
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat.
exception:

<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cdc] Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #4024:
URL: https://github.com/apache/paimon/pull/4024#issuecomment-2303514354
@zhuangchong Can you describe the whole reproducing steps? I cannot find which local test case in the context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cdc] Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat [paimon]
Posted by "zhuangchong (via GitHub)" <gi...@apache.org>.
zhuangchong commented on PR #4024:
URL: https://github.com/apache/paimon/pull/4024#issuecomment-2303533248
> @zhuangchong Can you describe the whole reproducing steps? I cannot find which local test case in the context.
According to issue #3999, the steps to reproduce are as follows:
Project Module: paimon-flink-action
Run the main method `org.apache.paimon.flink.action.FlinkActions` in idea
Main Arguments :
kafka_sync_database --warehouse file:///tmp/paimon --database ods_db --table_prefix ods_common_ --kafka_conf properties.bootstrap.servers=DT-US-dev-bg-kafka-01:9092,DT-US-dev-bg-kafka-02:9092,1DT-US-dev-bg-kafka-03:9092 --kafka_conf topic=MONITOR_COMMON_TOPIC --kafka_conf properties.group.id=group_ods_cwl_datacenter --kafka_conf scan.startup.mode=earliest-offset --kafka_conf value.format=canal-json --table_conf bucket=4 --table_conf changelog-producer=input --table_conf sink.parallelism=1 --table_conf metastore.partitioned-table=true
Add dependencies to paimon-flink-action pom file:
```
<dependencies>
<dependency>
<groupId>org.apache.paimon</groupId>
<artifactId>paimon-flink-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.paimon</groupId>
<artifactId>paimon-flink-cdc</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka</artifactId>
<version>3.0.1-1.18</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-runtime</artifactId>
<version>1.18.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner-loader</artifactId>
<version>1.18.1</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.flink</groupId>-->
<!-- <artifactId>flink-table-planner_2.12</artifactId>-->
<!-- <version>${flink.version}</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.paimon</groupId>
<artifactId>paimon-hive-connector-3.1</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-cli</artifactId>
<version>2.3.10</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>hadoop-hdfs</artifactId>
<groupId>org.apache.hadoop</groupId>
<version>${hadoop.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
```

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cdc] Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #4024:
URL: https://github.com/apache/paimon/pull/4024#issuecomment-2303556633
I understand what you mean. There indeed are some unnecessary dependencies here, but your modifications are too uncertain.
Could you directly abstract the format into a Java SPI, so that it can provide strong guarantees.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cdc] Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat [paimon]
Posted by "zhuangchong (via GitHub)" <gi...@apache.org>.
zhuangchong commented on PR #4024:
URL: https://github.com/apache/paimon/pull/4024#issuecomment-2301538649
> Why this fix works?
Sorry, I can't answer this question well.
I know this is a problem related to class loading. Since the DataFormat enumeration will load all enumeration instances during initialization, the JVM will try to load the KafkaDebeziumJsonDeserializationSchema class.
The implementation class CachedSchemaRegistryClient of io.confluent.kafka.schemaregistry.client.SchemaRegistryClient is introduced in the KafkaDebeziumJsonDeserializationSchema class.
The exception stack is as follows:

When I put the CachedSchemaRegistryClient in the KafkaDebeziumJsonDeserializationSchema class into the ConfluentAvroDeserializationSchema tool class, there was no exception in the local test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cdc] Fix kafka canal-json cdc action cannot find confluent schema registry client class when converting dataformat [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #4024:
URL: https://github.com/apache/paimon/pull/4024
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org