vburenin commented on a change in pull request #2476:
URL: https://github.com/apache/hudi/pull/2476#discussion_r566977565



##########
File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/UtilHelpers.java
##########
@@ -96,19 +94,21 @@
   private static final Logger LOG = LogManager.getLogger(UtilHelpers.class);
 
   public static Source createSource(String sourceClass, TypedProperties cfg, 
JavaSparkContext jssc,
-                                    SparkSession sparkSession, SchemaProvider 
schemaProvider, HoodieDeltaStreamerMetrics metrics) throws IOException {
-
+                                    SparkSession sparkSession, SchemaProvider 
schemaProvider,
+                                    HoodieDeltaStreamerMetrics metrics) throws 
IOException {
     try {
-      if (JsonKafkaSource.class.getName().equals(sourceClass)
-              || AvroKafkaSource.class.getName().equals(sourceClass)) {
+      try {

Review comment:
       Not sure about readability, I would say it looks fine to me. The goal is 
to add an ability to override the parent class that expects "metrics" as a 
parameter, otherwise I simply can't do that and I can't include that class into 
the hudi source.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to