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



##########
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:
       I am not sure if handling this via exception is making this more 
readable. wdyt? 
   For e.g the current impl makes it clear, in what case a certain constructor 
is called,. 




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