-
Notifications
You must be signed in to change notification settings - Fork 303
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
Kafka connector was throwing null pointer exception when entire record is null, issue fix. #2575
Kafka connector was throwing null pointer exception when entire record is null, issue fix. #2575
Conversation
… null, issue fix.
if (record == null || record.value() == null) { | ||
LOGGER.warn("[NullRecord] {} Received a null record or record value, offset: {}", splitParameters, record != null ? record.offset() : "unknown"); | ||
return 0; | ||
} |
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.
can we move this code block to before spiller.writeRows? Doesn't seem related to the lambda in spiller.writeRows
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.
Moved to before spiller.writeRows.
if (record == null || record.value() == null) { | ||
LOGGER.warn("[NullRecord] {} Received a null record or record value, offset: {}", splitParameters, record != null ? record.offset() : "unknown"); | ||
return 0; // Skip processing this record | ||
} |
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.
Same as above
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.
Moved to before spiller.writeRows.
if (record == null || record.value() == null) { | ||
LOGGER.warn("[NullRecord] {} Received a null record or record value, offset: {}", splitParameters, record != null ? record.offset() : "unknown"); | ||
return 0; // Skip processing this record | ||
} |
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.
Same as above
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.
Moved to before spiller.writeRows.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2575 +/- ##
============================================
+ Coverage 60.68% 60.71% +0.03%
- Complexity 3871 3873 +2
============================================
Files 593 593
Lines 22130 22130
Branches 2732 2735 +3
============================================
+ Hits 13430 13437 +7
+ Misses 7398 7385 -13
- Partials 1302 1308 +6 ☔ View full report in Codecov by Sentry. |
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.
verified with chngpe about codecov issues. record == null can't be hit with MockConsumer because it gives NullPointerException
- Upgraded Arrow to 18 (#2576) - Fixed Encoding Warning (#2595) - Fix codecov format error (#2594) - Update Code Cov on Daily Validation Tests (#2593) - Allow custom glue endpoint to be used (#2587) - Msk connector was throwing null pointer exception when entire record is null, issue fix. (#2588) - Kafka connector was throwing null pointer exception when entire record is null, issue fix. (#2575)
Issue #, if available:
Description of changes:
Kafka connector was throwing null pointer exception when it encountered a completely null record. This change resolves that issue.
PFA testing doc for reference.
Kafka NullPointerException Issue Fix.docx
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.