[YAML] Fix error handling for KafkaSchemaTransforms#29261
[YAML] Fix error handling for KafkaSchemaTransforms#29261robertwb merged 3 commits intoapache:masterfrom
Conversation
|
R: @robertwb |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
|
R: @damccorm |
...va/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaReadSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...va/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaReadSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Hmm... Can we refactor this so as not to be so duplicative here?
There was a problem hiding this comment.
I did a quick refactor. There is probably a more elegant solution, but I'm trying to get this submitted asap with 2.52
...va/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaReadSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...va/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaReadSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...a/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...a/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...a/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...a/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...a/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
...a/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
e6e97f5 to
470f17f
Compare
Codecov Report
@@ Coverage Diff @@
## master #29261 +/- ##
==========================================
- Coverage 38.31% 38.28% -0.04%
==========================================
Files 688 689 +1
Lines 101879 101990 +111
==========================================
+ Hits 39040 39043 +3
- Misses 61259 61367 +108
Partials 1580 1580
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
...va/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaReadSchemaTransformProvider.java
Outdated
Show resolved
Hide resolved
| PCollection<byte[]> kafkaValues = | ||
| input.getPipeline().apply(kafkaRead.withoutMetadata()).apply(Values.create()); | ||
|
|
||
| Schema errorSchema = ErrorHandling.errorSchema(ERROR_SCHEMA); |
There was a problem hiding this comment.
This probably shouldn't be an ErrorSchema of ERROR_SCHEMA.
We should add a errorSchema(FieldType) overload, where bytes is the thing to pass here. I know John Casey is looking at DLQ stuff where we might want to refactor this a bit more. (I suppose we're calling YAML stable, but the formatting of the error messages may have to change.)
There was a problem hiding this comment.
Ok, I did that initially, but I wan't sure if that would mess with our Row-based approach. I can refactor that and test
There was a problem hiding this comment.
#29274 (as this is in the docs, no need to cherry-pick that one).
5ecf053 to
fc607b4
Compare
Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
fc607b4 to
49d2ee7
Compare
Add proper error handling to KafkaReadSchemaTransform and KafkaWriteSchemaTransform
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.