You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/06/28 02:41:16 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #9059: [HUDI-6297] Fixed issue in consuming transactional topic

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


##########
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:
   What does the `break` indicates here ? Does that mean all the subsequent records are invalid ?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org