-
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
[Fix][Kafka] Fix in kafka streaming mode can not read incremental data #7871
Conversation
Please add test cases |
|
||
if (isStreamingMode) { | ||
return Collections.emptyMap(); | ||
} |
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.
@Carl-Zhou-CN The fix is LGTM.
But I have a question about Kafka Batch mode, there is no option to set end offset, so how do stop it in batch mode?
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.
In batch processing mode, the last offset in the partition will be consumed when reaching the slice.
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, looks we need update the doc, I am not find related notes.
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'll be adding test cases and documentation by the end of the week
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.
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.
Only the offset of the current consumption data is submitted
Good catch, @Carl-Zhou-CN we also need update here. Or can we in streaming mode, not return an empty map, return the value with Long.MAX_VALUE? |
Yes, he was ignored |
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.
docs/en/connector-v2/source/kafka.md
Outdated
@@ -59,6 +59,7 @@ They can be downloaded via install-plugin.sh or from the Maven central repositor | |||
### Simple | |||
|
|||
> This example reads the data of kafka's topic_1, topic_2, topic_3 and prints it to the client.And if you have not yet installed and deployed SeaTunnel, you need to follow the instructions in Install SeaTunnel to install and deploy SeaTunnel. And if you have not yet installed and deployed SeaTunnel, you need to follow the instructions in [Install SeaTunnel](../../start-v2/locally/deployment.md) to install and deploy SeaTunnel. And then follow the instructions in [Quick Start With SeaTunnel Engine](../../start-v2/locally/quick-start-seatunnel-engine.md) to run this job. | |||
> In batch mode, it will consume continuously until it reaches the maximum offset. |
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.
Suggest move this hint to https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/source/kafka.md?plain=1#L14
And the maximun
is not clear, in batch mode, it will stop when it reaches the offset at startup.
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.
This PR modification does not alter the behavior of the Kafka source. I believe adding it above does not make a significant difference and disrupts the structure of the documentation
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.
But I updated the description to explain the process
LGTM |
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Current test
Check list
New License Guide
release-note
.