-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[HUDI-2413] fix Sql source's checkpoint issue #3648
Conversation
@fengjian428 Just a high level question, how is empty string solving the problems caused by null checkpoint? |
In DeltaSync line 432, if both resumeCheckpointStr and checkpointStr is null, will judge as no new data, and won't do the next,and in this case , SqlSource is design as one time job |
Hi,I also encountered the same problem in the previous use. I simply wrote the checkpoint as "0". Overall LGTM but I have a question about whether the empty string is repeated with 'formatAdapter.getSource() instanceof SqlSource', and whether it only needs to add a judgment in DeltaSync? |
@codope : can you review this as well. |
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 think the nicer way would be not have deltastreamer error out (or at-least control this behavior) if there is no checkpoint, but to provide an empty one? This PR adds source specific checks to the DeltaSync
class which I'd like to avoid.
Good for @codope to review |
I remove the exception throw part, instead of add a warning. |
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestSqlSource.java
Outdated
Show resolved
Hide resolved
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java
Outdated
Show resolved
Hide resolved
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestSqlSource.java
Show resolved
Hide resolved
@fengjian428 : can you please address the feedback when you get a chance. |
@fengjian428 : Do you think you can address the feedback in the next 2 to 3 weeks. We would like to get this in for 0.11.0. If you are occupied, one of us from the community can take it forward. Let us know. |
@codope : this is ready for review now. |
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. Just one minor comment.
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/HoodieDeltaStreamer.java
Outdated
Show resolved
Hide resolved
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. CI passed.
* [HUDI-2413] fix Sql source's checkpoint * Fixing sql source checkpoint handling * Fixing docs Co-authored-by: jian.feng <fengjian428@gmial.com> Co-authored-by: sivabalan <n.siva.b@gmail.com>
https://issues.apache.org/jira/browse/HUDI-2413
What is the purpose of the pull request
Brief change log
(for example:)
Verify this pull request
This change added tests and can be verified as follows:
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.