-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support schema registry in risedev #17001
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
control substitution on | ||
|
||
# FIXME: does this really work?? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😄 |
||
# Start with nosim to avoid running in deterministic test | ||
|
||
|
||
|
@@ -7,18 +10,18 @@ CREATE TABLE upsert_avro_json_default_key ( primary key (rw_key) ) | |
INCLUDE KEY AS rw_key | ||
WITH ( | ||
connector = 'kafka', | ||
properties.bootstrap.server = 'message_queue:29092', | ||
properties.bootstrap.server = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
topic = 'upsert_avro_json') | ||
FORMAT UPSERT ENCODE AVRO (schema.registry = 'http://message_queue:8081'); | ||
FORMAT UPSERT ENCODE AVRO (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
statement ok | ||
CREATE TABLE upsert_student_avro_json ( primary key (rw_key) ) | ||
INCLUDE KEY AS rw_key | ||
WITH ( | ||
connector = 'kafka', | ||
properties.bootstrap.server = 'message_queue:29092', | ||
properties.bootstrap.server = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
topic = 'upsert_student_avro_json') | ||
FORMAT UPSERT ENCODE AVRO (schema.registry = 'http://message_queue:8081'); | ||
FORMAT UPSERT ENCODE AVRO (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
|
||
# TODO: Uncomment this when we add test data kafka key with format `"ID":id` | ||
|
@@ -28,45 +31,45 @@ FORMAT UPSERT ENCODE AVRO (schema.registry = 'http://message_queue:8081'); | |
# ) | ||
# WITH ( | ||
# connector = 'kafka', | ||
# properties.bootstrap.server = 'message_queue:29092', | ||
# properties.bootstrap.server = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
# topic = 'upsert_avro_json') | ||
# FORMAT UPSERT ENCODE AVRO (schema.registry = 'http://message_queue:8081'); | ||
# FORMAT UPSERT ENCODE AVRO (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
|
||
statement ok | ||
CREATE TABLE debezium_non_compact (PRIMARY KEY(order_id)) with ( | ||
connector = 'kafka', | ||
kafka.topic = 'debezium_non_compact_avro_json', | ||
kafka.brokers = 'message_queue:29092', | ||
kafka.brokers = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
kafka.scan.startup.mode = 'earliest' | ||
) FORMAT DEBEZIUM ENCODE AVRO (schema.registry = 'http://message_queue:8081'); | ||
) FORMAT DEBEZIUM ENCODE AVRO (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
|
||
statement ok | ||
CREATE TABLE debezium_compact (PRIMARY KEY(order_id)) with ( | ||
connector = 'kafka', | ||
kafka.topic = 'debezium_compact_avro_json', | ||
kafka.brokers = 'message_queue:29092', | ||
kafka.brokers = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
kafka.scan.startup.mode = 'earliest' | ||
) FORMAT DEBEZIUM ENCODE AVRO (schema.registry = 'http://message_queue:8081'); | ||
) FORMAT DEBEZIUM ENCODE AVRO (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
statement ok | ||
CREATE TABLE kafka_json_schema_plain with ( | ||
connector = 'kafka', | ||
kafka.topic = 'kafka_json_schema', | ||
kafka.brokers = 'message_queue:29092', | ||
kafka.brokers = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
kafka.scan.startup.mode = 'earliest' | ||
) FORMAT PLAIN ENCODE JSON (schema.registry = 'http://schemaregistry:8082'); | ||
) FORMAT PLAIN ENCODE JSON (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
statement ok | ||
CREATE TABLE kafka_json_schema_upsert (PRIMARY KEY(rw_key)) | ||
INCLUDE KEY AS rw_key | ||
with ( | ||
connector = 'kafka', | ||
kafka.topic = 'kafka_upsert_json_schema', | ||
kafka.brokers = 'message_queue:29092', | ||
kafka.brokers = '${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}', | ||
kafka.scan.startup.mode = 'earliest' | ||
) FORMAT UPSERT ENCODE JSON (schema.registry = 'http://schemaregistry:8082'); | ||
) FORMAT UPSERT ENCODE JSON (schema.registry = '${RISEDEV_SCHEMA_REGISTRY_URL}'); | ||
|
||
statement ok | ||
flush; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -861,6 +861,10 @@ profile: | |
user-managed: true | ||
address: message_queue | ||
port: 29092 | ||
- use: schema-registry | ||
user-managed: true | ||
address: schemaregistry | ||
port: 8082 | ||
|
||
ci-inline-source-test: | ||
config-path: src/config/ci-recovery.toml | ||
|
@@ -1431,9 +1435,8 @@ template: | |
|
||
# Listen port of KRaft controller | ||
controller-port: 29093 | ||
|
||
# Listen address | ||
listen-address: ${address} | ||
Comment on lines
-1435
to
-1436
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. listen-address is unused |
||
# Listen port for other services in docker (schema-registry) | ||
docker-port: 29094 | ||
|
||
# The docker image. Can be overridden to use a different version. | ||
image: "confluentinc/cp-kafka:7.6.1" | ||
|
@@ -1446,6 +1449,23 @@ template: | |
|
||
user-managed: false | ||
|
||
schema-registry: | ||
# Id to be picked-up by services | ||
id: schema-registry-${port} | ||
|
||
# Advertise address | ||
address: "127.0.0.1" | ||
|
||
# Listen port of Schema Registry | ||
port: 8081 | ||
|
||
# The docker image. Can be overridden to use a different version. | ||
image: "confluentinc/cp-schema-registry:7.6.1" | ||
|
||
user-managed: false | ||
|
||
provide-kafka: "kafka*" | ||
|
||
# Google pubsub emulator service | ||
pubsub: | ||
id: pubsub-${port} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only try
RISEDEV_SCHEMA_REGISTRY_URL
in this test. Not bother to modify others.