ad1happy2go commented on code in PR #9059:
URL: https://github.com/apache/hudi/pull/9059#discussion_r1244613990


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java:
##########
@@ -639,7 +639,13 @@ private Pair<SchemaProvider, Pair<String, 
JavaRDD<HoodieRecord>>> fetchFromSourc
             BuiltinKeyGenerator builtinKeyGenerator = (BuiltinKeyGenerator) 
HoodieSparkKeyGeneratorFactory.createKeyGenerator(props);
             List<HoodieRecord> avroRecords = new ArrayList<>();
             while (genericRecordIterator.hasNext()) {
-              GenericRecord genRec = genericRecordIterator.next();
+              GenericRecord genRec = null;
+              try {
+                genRec = genericRecordIterator.next();
+              } catch (IllegalArgumentException e) {
+                LOG.warn("Handling exception for transaction topic  -  " + 
e.getMessage());
+                break;

Review Comment:
   @danny0405 For the transactional(exactly once) topics, there is an issue 
that even if it reaches the end of topic the hasNext function gives true but 
the next function is throwing the exception. In such cases only we will ignore 
the exception and break the loop.
   
   For the normal Kafka topics catch block will not be running as next will not 
fail.



-- 
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]

Reply via email to