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

[Feature][Connector-v2][PulsarSink]Add Pulsar Sink Connector. #4382

Merged
merged 35 commits into from
Jan 11, 2024

Conversation

lightzhao
Copy link
Contributor

@lightzhao lightzhao commented Mar 21, 2023

Purpose of this pull request

Add Pulsar Sink Connector. #3018

Check list

@lightzhao
Copy link
Contributor Author

lightzhao commented Mar 24, 2023

Hello everyone, ci check cannot automatically, ci check require approval?

@lightzhao
Copy link
Contributor Author

Hello everyone, it has been running stably in the test environment for two weeks, who has time to help review.

Copy link
Contributor

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

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

Comment on lines 11 to 12
- [x] [batch](../../concept/connector-v2-features.md)
- [x] [stream](../../concept/connector-v2-features.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [x] [batch](../../concept/connector-v2-features.md)
- [x] [stream](../../concept/connector-v2-features.md)

https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/concept/connector-v2-features.md#sink-connector-features

Comment on lines 14 to 16
- [ ] [column projection](../../concept/connector-v2-features.md)
- [x] [parallelism](../../concept/connector-v2-features.md)
- [ ] [support user-defined split](../../concept/connector-v2-features.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [ ] [column projection](../../concept/connector-v2-features.md)
- [x] [parallelism](../../concept/connector-v2-features.md)
- [ ] [support user-defined split](../../concept/connector-v2-features.md)

@lightzhao
Copy link
Contributor Author

please update release-note.md please add e2e testcase

reference https://github.com/apache/incubator-seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-kafka-e2e

waiting #3990 ,In this pr I added the pulsar-e2e module. doc has been updated.

@lightzhao
Copy link
Contributor Author

Hello everyone, why can't the automatic ci check be performed after updating the code now, and it needs to be approved?

@TyrantLucifer
Copy link
Member

Hello everyone, why can't the automatic ci check be performed after updating the code now, and it needs to be approved?

Yes, infra changed the rule of this. It needs to be approved.

@lightzhao
Copy link
Contributor Author

Hello everyone, why can't the automatic ci check be performed after updating the code now, and it needs to be approved?

Yes, infra changed the rule of this. It needs to be approved.

please review #3990,and then add pulsar sink e2e test. thanks.

@lightzhao lightzhao requested a review from hailin0 May 26, 2023 10:37
@lightzhao
Copy link
Contributor Author

please approve ci.

@lightzhao
Copy link
Contributor Author

@Hisoka-X @hailin0 @TyrantLucifer please approve ci.

@lightzhao
Copy link
Contributor Author

@Hisoka-X @hailin0 @EricJoy2048 please approve ci.

@lightzhao
Copy link
Contributor Author

@lightzhao
Copy link
Contributor Author

@ALL Can anyone help to review this pr?

@lightzhao
Copy link
Contributor Author

@lightzhao
Copy link
Contributor Author

It's been a long time, @TyrantLucifer @hailin0 @EricJoy2048 @Hisoka-X PTAL.

@ic4y ic4y closed this Aug 5, 2023
@@ -0,0 +1,174 @@
# Apache Pulsar
Copy link
Member

Choose a reason for hiding this comment

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

docs/en/connector-v2/sink/puslar.md -> Please refer to the "kafka.md" file for some upgrade instructions,
https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/sink/Kafka.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

import static org.apache.seatunnel.connectors.seatunnel.pulsar.config.SourceProperties.CLIENT_SERVICE_URL;

@AutoService(Factory.class)
public class PulsarSinkFactory implements TableSinkFactory {
Copy link
Member

Choose a reason for hiding this comment

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

Support TableSourceFactory/TableSinkFactory on connector,please refer to the following link for the upgrade instructions: #5651.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

* {@link PulsarSinkWriter} and {@link PulsarSinkCommitter}.
*/
@AutoService(SeaTunnelSink.class)
public class PulsarSink
Copy link
Member

Choose a reason for hiding this comment

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

Support multi-table sink feature: please refer to the following link for the upgrade instructions: #5652

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do kafka and pulsar need the support of multiple table sinks? Multiple topics are supported.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Supporting multiple tables is mainly to accept multiple upstream tables, which can be implemented separately in the future.

public class PulsarSinkState implements Serializable {

/** The transaction id. */
private final TxnID txnID;
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to store the 'topic' as part of the state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only TxnID is required when commit, and the topic parameter is not required.

Copy link
Member

Choose a reason for hiding this comment

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

ok

/**
* get message SerializationSchema
*
* @param rowType
Copy link
Member

Choose a reason for hiding this comment

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

The comment of these parameters is useless, can we delete it?

/**
* get key SerializationSchema
*
* @param keyFieldNames
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

/**
* get partition key field list
*
* @param pluginConfig
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@lightzhao
Copy link
Contributor Author

@hailin0 @Carl-Zhou-CN @Hisoka-X PTAL.

Carl-Zhou-CN
Carl-Zhou-CN previously approved these changes Dec 24, 2023
Copy link
Member

@Carl-Zhou-CN Carl-Zhou-CN left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

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

LGTM

…src/test/resources/fake_to_pulsar.conf

Co-authored-by: hailin0 <hailin088@gmail.com>
@lightzhao
Copy link
Contributor Author

@hailin0 @Hisoka-X @Carl-Zhou-CN PTAL.

@hailin0 hailin0 merged commit 543d2c5 into apache:dev Jan 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants