imaffe opened a new pull request #18406:
URL: https://github.com/apache/flink/pull/18406
## Contribution Checklist
- Make sure that the pull request corresponds to a [JIRA
issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are
made for typos in JavaDoc or documentation files, which need no JIRA issue.
- Name the pull request in the form "[FLINK-XXXX] [component] Title of the
pull request", where *FLINK-XXXX* should be replaced by the actual issue
number. Skip *component* if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following
this pattern: `[hotfix] [docs] Fix typo in event time introduction` or
`[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
- Fill out the template below to describe the changes contributed by the
pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean
verify` passes. You can set up Azure Pipelines CI to do that following [this
guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
- Each pull request should address only one issue, not mix up code from
multiple issues.
- Each commit in the pull request has a meaningful commit message
(including the JIRA id)
- Once all items of the checklist are addressed, remove the above text and
this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
## What is the purpose of the change
Currently the source connector reads all messages as Message<byte[]>, and
implements a deserialization abstraction to deserialize the byte array message.
This deserialization abstraction supports both flink schema and pulsar schema.
However because of this extra layer of abstraction, even when using pulsar
schema, the schema info is not provided to the consumer (client), so it is not
using any pulsar’s schema validation mechanism. (If pulsar client has a schema,
it will send the schema to broker on connect and broker will validate if it is
a valid schema according to a preset compatibility rule :
https://pulsar.apache.org/docs/en/schema-evolution-compatibility/).
## Brief change log
- added test class PulsarDeserializationSchemaTest
- changed PulsarSchemaWrapper#decode() method
- use <?> generic in method signature
- pass in schema when creating consumer
- KeyValueSchemaFactory changed one implementation (needs Yufan's review)
## Verifying this change
This change added tests and can be verified as follows:
- Added tests in PulsarDeserializationSchemaTest
## Does this pull request potentially affect one of the following parts:
- The serializers: Yes, used a custome serializer for AVRO based structs
- Others : No
## Documentation
- Documentation should should be added in a different commit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]