[SPARK-50985][SS] Classify Kafka Timestamp Offsets mismatch error instead of assert and throw error for missing server in KafkaTokenProvider#49662
Closed
micheal-o wants to merge 3 commits intoapache:masterfrom
Conversation
HeartSaVioR
reviewed
Jan 31, 2025
Contributor
HeartSaVioR
left a comment
There was a problem hiding this comment.
Looks good in general. A couple comments.
connector/kafka-0-10-sql/src/main/resources/error/kafka-error-conditions.json
Show resolved
Hide resolved
...tor/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaOffsetReaderSuite.scala
Outdated
Show resolved
Hide resolved
Contributor
|
https://github.com/micheal-o/spark/actions/runs/13127546346/job/36626660666 CI failure is unrelated. |
Contributor
|
Thanks! Merging to master/4.0. |
HeartSaVioR
pushed a commit
that referenced
this pull request
Feb 4, 2025
…tead of assert and throw error for missing server in KafkaTokenProvider ### What changes were proposed in this pull request? 1. In Kafka offset reader, for timestamp offsets, we assert that the assigned partitions is equal to specified partitions. Removing the assert and throwing a classified error for better error presentation 2. In Kafka config updater, when we setAuthenticationConfigIfNeeded, we don't handle the case where user didn't specify the bootsrap server, hence leading to NoSuchElementException. Now throwing a properly classified error. ### Why are the changes needed? Error classification for better user experience ### Does this PR introduce _any_ user-facing change? Yes, error classification ### How was this patch tested? Added new tests ### Was this patch authored or co-authored using generative AI tooling? No Closes #49662 from micheal-o/KafkaTimestampOffsetErrFix. Authored-by: micheal-o <micheal.okutubo@gmail.com> Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com> (cherry picked from commit 572f57a) Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
zifeif2
pushed a commit
to zifeif2/spark
that referenced
this pull request
Nov 14, 2025
…tead of assert and throw error for missing server in KafkaTokenProvider ### What changes were proposed in this pull request? 1. In Kafka offset reader, for timestamp offsets, we assert that the assigned partitions is equal to specified partitions. Removing the assert and throwing a classified error for better error presentation 2. In Kafka config updater, when we setAuthenticationConfigIfNeeded, we don't handle the case where user didn't specify the bootsrap server, hence leading to NoSuchElementException. Now throwing a properly classified error. ### Why are the changes needed? Error classification for better user experience ### Does this PR introduce _any_ user-facing change? Yes, error classification ### How was this patch tested? Added new tests ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#49662 from micheal-o/KafkaTimestampOffsetErrFix. Authored-by: micheal-o <micheal.okutubo@gmail.com> Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com> (cherry picked from commit 1b19de6) Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
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.
What changes were proposed in this pull request?
Why are the changes needed?
Error classification for better user experience
Does this PR introduce any user-facing change?
Yes, error classification
How was this patch tested?
Added new tests
Was this patch authored or co-authored using generative AI tooling?
No