EMsnap commented on code in PR #9792:
URL: https://github.com/apache/inlong/pull/9792#discussion_r1517462900
##########
inlong-sort/sort-formats/format-rowdata/format-rowdata-base/src/main/java/org/apache/inlong/sort/formats/base/DefaultDeserializationSchema.java:
##########
@@ -49,13 +52,25 @@ public abstract class DefaultDeserializationSchema<T>
implements Deserialization
*/
private boolean errorOccurred = false;
+ protected FailureHandler failureHandler;
+
/**
* The format metric group.
*/
protected transient FormatMetricGroup formatMetricGroup;
public DefaultDeserializationSchema(boolean ignoreErrors) {
this.ignoreErrors = ignoreErrors;
+ if (ignoreErrors) {
+ failureHandler = new IgnoreFailureHandler();
+ } else {
+ failureHandler = new NoOpFailureHandler();
+ }
+ }
+
+ public DefaultDeserializationSchema(FailureHandler failureHandler) {
+ this.failureHandler = failureHandler;
+ this.ignoreErrors = false;
Review Comment:
why this.ignoreErrors = false is alway false? maybe user will pass
IgnoreFailureHandler here
--
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]