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

[Improve][Connector-V2-kafka] Support for dynamic discover topic & partition in streaming mode #3125

Merged
merged 15 commits into from
Nov 22, 2022

Conversation

Carl-Zhou-CN
Copy link
Member

Purpose of this pull request

Check list

close #2958

@Override
public void open() {
this.adminClient = initAdminClient(this.metadata.getProperties());
ParallelSource parallelSource = context.getParallelSource();
Copy link
Member

Choose a reason for hiding this comment

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

It's not right the connector to use translation module class. You can use ScheduledThreadPoolExecutor to execute topic find with fixed rate. Then close ScheduledThreadPoolExecutor when KafkaSourceSplitEnumerator closed.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Hisoka-X Well, I have this idea. I think that if the search thread fails, the consumer thread can be ended. If the search thread fails, do we need to affect the consumer thread

Copy link
Member

Choose a reason for hiding this comment

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

It should be, if not, user will think program running fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem I'm facing now is that if I want to stop the source, it seems that I can only interrupt at pollNext,Because I can't get too much valid information in context,Do you have any other good suggestions,

@Carl-Zhou-CN
Copy link
Member Author

Carl-Zhou-CN commented Oct 26, 2022

@Hisoka-X Please help to review

@Hisoka-X
Copy link
Member

Hisoka-X commented Oct 27, 2022

Retry CI after #3183 merged

@Carl-Zhou-CN
Copy link
Member Author

Retry CI after #3183 merged

ok

@Hisoka-X Hisoka-X closed this Oct 29, 2022
@Hisoka-X Hisoka-X reopened this Oct 29, 2022
Hisoka-X
Hisoka-X previously approved these changes Oct 29, 2022
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

LGTM

## partition-discovery.interval-millis [long]

The interval for dynamically discovering topics and partitions.

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 Author

Choose a reason for hiding this comment

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

OK

Hisoka-X
Hisoka-X previously approved these changes Nov 7, 2022
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

LGTM

EricJoy2048
EricJoy2048 previously approved these changes Nov 8, 2022
@EricJoy2048 EricJoy2048 dismissed stale reviews from Hisoka-X and themself via 06ce652 November 8, 2022 10:52
EricJoy2048
EricJoy2048 previously approved these changes Nov 8, 2022
Hisoka-X
Hisoka-X previously approved these changes Nov 8, 2022
@Hisoka-X
Copy link
Member

Hisoka-X commented Nov 9, 2022

@Carl-Zhou-CN Please resolve conflict. Thanks!

@Carl-Zhou-CN
Copy link
Member Author

@Hisoka-X @EricJoy2048 Please help to review.

@Carl-Zhou-CN Carl-Zhou-CN reopened this Nov 10, 2022
@Hisoka-X Hisoka-X closed this Nov 10, 2022
@Hisoka-X Hisoka-X reopened this Nov 10, 2022
@Carl-Zhou-CN Carl-Zhou-CN reopened this Nov 11, 2022
@Carl-Zhou-CN Carl-Zhou-CN reopened this Nov 11, 2022
@ic4y ic4y closed this Nov 11, 2022
@ic4y ic4y reopened this Nov 11, 2022
@Carl-Zhou-CN Carl-Zhou-CN reopened this Nov 11, 2022
@Hisoka-X Hisoka-X merged commit 999cfd6 into apache:dev Nov 22, 2022
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.

[Improve][Connector-V2-kafka] Support for dynamic discover topic & partition in streaming mode
4 participants