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


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/ErrorTableUtils.java:
##########
@@ -47,27 +48,29 @@ public static Option<BaseErrorTableWriter> 
getErrorTableWriter(HoodieStreamer.Co
                                                                  SparkSession 
sparkSession,
                                                                  
TypedProperties props,
                                                                  
HoodieSparkEngineContext hoodieSparkContext,
-                                                                 FileSystem 
fileSystem) {
+                                                                 FileSystem fs,
+                                                                 
Option<HoodieIngestionMetrics> metrics) {
     String errorTableWriterClass = 
props.getString(ERROR_TABLE_WRITE_CLASS.key());
     
ValidationUtils.checkState(!StringUtils.isNullOrEmpty(errorTableWriterClass),
-        "Missing error table config " + ERROR_TABLE_WRITE_CLASS);
+                               "Missing error table config " + 
ERROR_TABLE_WRITE_CLASS);
 
-    Class<?>[] argClassArr = new Class[] {HoodieStreamer.Config.class,
-        SparkSession.class, TypedProperties.class, 
HoodieSparkEngineContext.class,
-        FileSystem.class};
-    String errMsg = "Unable to instantiate ErrorTableWriter with arguments 
type "
-        + Arrays.toString(argClassArr);
-    ValidationUtils.checkArgument(
-        ReflectionUtils.hasConstructor(BaseErrorTableWriter.class.getName(), 
argClassArr, false),
-        errMsg);
+    Class<?>[] legacyArgClass = new Class[]{HoodieStreamer.Config.class,
+        SparkSession.class, TypedProperties.class, 
HoodieSparkEngineContext.class, FileSystem.class};
+    Class<?>[] argClassV1 = new Class[]{HoodieStreamer.Config.class,
+        SparkSession.class, TypedProperties.class, 
HoodieSparkEngineContext.class, FileSystem.class, Option.class};

Review Comment:
   I think this is ok.



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