[Feature][RoutineLoad] Support for consuming kafka from the point of time#5832
Merged
morningman merged 1 commit intoapache:masterfrom May 22, 2021
Merged
[Feature][RoutineLoad] Support for consuming kafka from the point of time#5832morningman merged 1 commit intoapache:masterfrom
morningman merged 1 commit intoapache:masterfrom
Conversation
EmmyMiao87
reviewed
May 18, 2021
|
|
||
| 2) OFFSET_END: Subscribe from the end. | ||
|
|
||
| 3) Timestamp, the format is the same as kafka_offsets |
Contributor
There was a problem hiding this comment.
Suggested change
| 3) Timestamp, the format is the same as kafka_offsets | |
| 3) Timestamp, the format is the same as kafka_offsets |
| Example: | ||
|
|
||
| `"property.kafka_default_offsets" = "OFFSET_BEGINNING"` | ||
| `"property.kafka_default_offsets" = "2021-05-11 10:00:00"` |
Contributor
There was a problem hiding this comment.
Suggested change
| `"property.kafka_default_offsets" = "2021-05-11 10:00:00"` | |
| `"property.kafka_default_offsets" = "2021-05-11 10:00:00"` |
|
|
||
| 2) OFFSET_END: Subscribe from the end. | ||
|
|
||
| 3) Timestamp, the format must be like: "2021-05-11 10:00:00", the system will automatically locate the offset of the first message greater than or equal to the timestamp. |
Contributor
There was a problem hiding this comment.
Suggested change
| 3) Timestamp, the format must be like: "2021-05-11 10:00:00", the system will automatically locate the offset of the first message greater than or equal to the timestamp. | |
| 3) Timestamp, the format must be like: "2021-05-11 10:00:00", the system will automatically locate the offset of the first message greater than or equal to the timestamp. |
EmmyMiao87
reviewed
May 18, 2021
| for (String kafkaOffsetsStr : kafkaOffsetsStringList) { | ||
| if (TimeUtils.timeStringToLong(kafkaOffsetsStr) != -1) { | ||
| foundTime = true; | ||
| } else { |
Contributor
There was a problem hiding this comment.
else if (String is number) {}
else { format error}
Contributor
Author
There was a problem hiding this comment.
The kafkaOffsetsStr can be "OFFSET_END", "OFFSET_BEGINNING", number, "2020-10-10 00:00:00",
so only check if it is number is not enough.
94026a5 to
34adf89
Compare
stdpain
pushed a commit
to stdpain/incubator-doris
that referenced
this pull request
Jul 8, 2021
…time (apache#5832) Support when creating a kafka routine load, start consumption from a specified point in time instead of a specific offset. eg: ``` FROM KAFKA ( "kafka_broker_list" = "broker1:9092,broker2:9092", "kafka_topic" = "my_topic", "property.kafka_default_offsets" = "2021-10-10 11:00:00" ); or FROM KAFKA ( "kafka_broker_list" = "broker1:9092,broker2:9092", "kafka_topic" = "my_topic", "kafka_partitions" = "0,1,2", "kafka_offsets" = "2021-10-10 11:00:00, 2021-10-10 11:00:00, 2021-10-10 12:00:00" ); ``` This PR also reconstructed the analysis method of properties when creating or altering routine load jobs, and unified the analysis process in the `RoutineLoadDataSourceProperties` class.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Support when creating a kafka routine load, start consumption from a specified point in time instead of a specific offset.
eg:
This PR also reconstructed the analysis method of properties when creating or altering
routine load jobs, and unified the analysis process in the
RoutineLoadDataSourcePropertiesclass.Types of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...