yanghua commented on a change in pull request #3715:
URL: https://github.com/apache/hudi/pull/3715#discussion_r716480508
##########
File path:
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/JsonKafkaSource.java
##########
@@ -69,7 +69,14 @@ public JsonKafkaSource(TypedProperties properties,
JavaSparkContext sparkContext
private JavaRDD<String> toRDD(OffsetRange[] offsetRanges) {
return KafkaUtils.createRDD(sparkContext, offsetGen.getKafkaParams(),
offsetRanges,
- LocationStrategies.PreferConsistent()).map(x -> (String)
x.value());
+ LocationStrategies.PreferConsistent()).filter(x -> {
+ String msgValue = (String) x.value();
+ //Filter null messages from Kafka to prevent Exceptions
+ if (msgValue == null) {
Review comment:
`return msgValue != null;`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]