Skip to content
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

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

zymap
Copy link
Member

@zymap zymap commented Jun 29, 2022


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.

---

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.
@zymap zymap self-assigned this Jun 29, 2022
@zymap zymap requested review from hangc0276 and a team as code owners June 29, 2022 02:16
object = new PulsarObject<>((String) value, Schema.create(Schema.Type.STRING));
break;
default:
throw new RuntimeException("Failed to build pulsar object, the given type '" + schemaType + "' "
Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#85

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();
Copy link
Collaborator

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?

Copy link
Member Author

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

@hangc0276 hangc0276 merged commit 946ef80 into master Jun 30, 2022
@delete-merged-branch delete-merged-branch bot deleted the yong/bytes-schema-support branch June 30, 2022 01:34
zymap added a commit that referenced this pull request Jul 12, 2022
---

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)
zymap added a commit that referenced this pull request Jul 12, 2022
---

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)
zymap added a commit that referenced this pull request Jul 12, 2022
---

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)
hangc0276 added a commit that referenced this pull request Jul 25, 2022
---

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement request] supports bytes schema for the lakehouse connector
2 participants