rmahindra123 commented on code in PR #9913:
URL: https://github.com/apache/hudi/pull/9913#discussion_r1379620190
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -297,13 +286,20 @@ public StreamSync(HoodieStreamer.Config cfg, SparkSession
sparkSession, SchemaPr
this.errorTableWriter = ErrorTableUtils.getErrorTableWriter(cfg,
sparkSession, props, hoodieSparkContext, fs);
this.errorWriteFailureStrategy =
ErrorTableUtils.getErrorWriteFailureStrategy(props);
}
- this.formatAdapter = new SourceFormatAdapter(
- UtilHelpers.createSource(cfg.sourceClassName, props,
hoodieSparkContext.jsc(), sparkSession, schemaProvider, metrics),
- this.errorTableWriter, Option.of(props));
+ Source source = UtilHelpers.createSource(cfg.sourceClassName, props,
hoodieSparkContext.jsc(), sparkSession, schemaProvider, metrics);
+ this.formatAdapter = new SourceFormatAdapter(source,
this.errorTableWriter, Option.of(props));
this.transformer =
UtilHelpers.createTransformer(Option.ofNullable(cfg.transformerClassNames),
Option.ofNullable(schemaProvider).map(SchemaProvider::getSourceSchema),
this.errorTableWriter.isPresent());
-
+ if (this.cfg.operation == WriteOperationType.BULK_INSERT &&
source.getSourceType() == Source.SourceType.ROW
+ && this.props.getBoolean("hoodie.datasource.write.row.writer.enable",
false)) {
Review Comment:
Can you use the config variable instead of using the actual string?
--
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]