codope commented on code in PR #12392:
URL: https://github.com/apache/hudi/pull/12392#discussion_r1866611315
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DefaultSource.scala:
##########
@@ -232,7 +234,36 @@ class DefaultSource extends RelationProvider
HoodieSpecifiedOffsetRangeLimit(instantTime)
}
- new HoodieStreamSource(sqlContext, metadataPath, schema, parameters,
offsetRangeLimit)
+ val storageConf =
HadoopFSUtils.getStorageConf(sqlContext.sparkSession.sessionState.newHadoopConf())
+ val tablePath: StoragePath = {
+ val path = new StoragePath(parameters.getOrElse("path", "Missing 'path'
option"))
+ val fs = new HoodieHadoopStorage(path, storageConf)
+ TablePathUtils.getTablePath(fs, path).get()
+ }
+ val metaClient = HoodieTableMetaClient.builder()
+
.setConf(storageConf.newInstance()).setBasePath(tablePath.toString).build()
+ // Check if the incremental table read version is set. If set, use the
corresponding source
+ // which uses the version corresponding to IncrementalRelation to read the
data. And, also
+ // does the checkpoint management based on the version.
+ if (SparkConfigUtils.containsConfigProperty(parameters,
INCREMENTAL_READ_TABLE_VERSION)) {
Review Comment:
let's add a separate config for streaming instead of using this one. The
prupose is same, just that it's a streaming specific config.
--
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]