-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Conversation
@Override | ||
public void open() { | ||
this.adminClient = initAdminClient(this.metadata.getProperties()); | ||
ParallelSource parallelSource = context.getParallelSource(); |
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.
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.
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.
@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
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.
It should be, if not, user will think program running fine.
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.
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,
6062de0
to
6ad6dfe
Compare
@Hisoka-X Please help to review |
.../java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java
Outdated
Show resolved
Hide resolved
Retry CI after #3183 merged |
ok |
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.
LGTM
## partition-discovery.interval-millis [long] | ||
|
||
The interval for dynamically discovering topics and partitions. | ||
|
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.
Please add changed log
reference https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/connector-v2/source/Redis.md#next-version
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.
OK
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.
LGTM
@Carl-Zhou-CN Please resolve conflict. Thanks! |
…rtition in streaming mode
…rtition in streaming mode
06ce652
to
adc31df
Compare
@Hisoka-X @EricJoy2048 Please help to review. |
…rtition in streaming mode
…rtition in streaming mode
# Conflicts: # docs/en/connector-v2/source/kafka.md
…rtition in streaming mode
…rtition in streaming mode
…rtition in streaming mode
Purpose of this pull request
Check list
New License Guide
close #2958