wangxianghu commented on a change in pull request #2074:
URL: https://github.com/apache/hudi/pull/2074#discussion_r495519397
##########
File path:
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java
##########
@@ -190,8 +194,16 @@ public DeltaSync(HoodieDeltaStreamer.Config cfg,
SparkSession sparkSession, Sche
this.transformer =
UtilHelpers.createTransformer(cfg.transformerClassNames);
this.keyGenerator = DataSourceUtils.createKeyGenerator(props);
- this.formatAdapter = new SourceFormatAdapter(
- UtilHelpers.createSource(cfg.sourceClassName, props, jssc,
sparkSession, schemaProvider));
+ this.metrics = new
HoodieDeltaStreamerMetrics(getHoodieClientConfig(this.schemaProvider));
+
+ if (JsonKafkaSource.class.getName().equals(cfg.sourceClassName)
Review comment:
Move this check into `UtilHelpers#createSource`? use different
constructor according to source type
this can avoid checking two times
----------------------------------------------------------------
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]