yihua commented on code in PR #10778:
URL: https://github.com/apache/hudi/pull/10778#discussion_r1542071132


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/HoodieStreamerUtils.java:
##########
@@ -159,7 +156,16 @@ public static Option<JavaRDD<HoodieRecord>> 
createHoodieRecords(HoodieStreamer.C
    * @return the representation of error record (empty {@link HoodieRecord} 
and the error record
    * String) for writing to error table.
    */
-  private static Either<HoodieRecord, String> 
generateErrorRecord(GenericRecord genRec) {
+  private static Either<HoodieRecord, String> 
generateErrorRecordOrThrowException(GenericRecord genRec, Exception e, boolean 
shouldErrorTable) {
+    if (!shouldErrorTable) {
+      if (e instanceof HoodieKeyException) {
+        throw (HoodieKeyException) e;
+      } else if (e instanceof HoodieKeyGeneratorException) {
+        throw (HoodieKeyGeneratorException) e;

Review Comment:
   Got it



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