-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support bytes schema for the lakehouse connector #75
Conversation
--- Fixes: #60 *Motivation* Support bytes schema for the lakehouse connector. We construct the PulsarObject for saving the primitive schema(currently only have bytes and string). The message with primitive schema will write into the lakehouse table with key name 'message' by default. You can change the name according to the configuration.
object = new PulsarObject<>((String) value, Schema.create(Schema.Type.STRING)); | ||
break; | ||
default: | ||
throw new RuntimeException("Failed to build pulsar object, the given type '" + schemaType + "' " |
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.
We need to support all primitive type that Pulsar supported.
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.
I'm not sure if it needs to support INT, BOOLEAN or DOUBLE. Because it looks useless to save an int or boolean into the table. so I want to support it when there has someone who wants it.
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.
I created an issue to track it. We can support String and Byte first. If there is requests in the future, we can support other primitive types.
public PulsarObject(T value, Schema schema) { | ||
this.value = value; | ||
valueSchema = schema; | ||
this.uuid = UUID.randomUUID().toString(); |
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.
What's the meaning of uuid?
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.
UUID is used as the partition key for the hudi table
--- Fixes: #60 *Motivation* Support bytes schema for the lakehouse connector. We construct the PulsarObject for saving the primitive schema(currently only have bytes and string). The message with primitive schema will write into the lakehouse table with key name 'message' by default. You can change the name according to the configuration. (cherry picked from commit 946ef80)
--- Fixes: #60 *Motivation* Support bytes schema for the lakehouse connector. We construct the PulsarObject for saving the primitive schema(currently only have bytes and string). The message with primitive schema will write into the lakehouse table with key name 'message' by default. You can change the name according to the configuration. (cherry picked from commit 946ef80)
--- Fixes: #60 *Motivation* Support bytes schema for the lakehouse connector. We construct the PulsarObject for saving the primitive schema(currently only have bytes and string). The message with primitive schema will write into the lakehouse table with key name 'message' by default. You can change the name according to the configuration. (cherry picked from commit 946ef80)
--- Fixes: #60 *Motivation* Support bytes schema for the lakehouse connector. We construct the PulsarObject for saving the primitive schema(currently only have bytes and string). The message with primitive schema will write into the lakehouse table with key name 'message' by default. You can change the name according to the configuration. (cherry picked from commit 946ef80)
Fixes: #60
Motivation
Support bytes schema for the lakehouse connector.
We construct the PulsarObject for saving the primitive schema(currently only
have bytes and string). The message with primitive schema will write into the
lakehouse table with key name 'message' by default. You can change the name
according to the configuration.