linliu-code commented on code in PR #12392:
URL: https://github.com/apache/hudi/pull/12392#discussion_r1866658206
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/streaming/HoodieStreamSourceV2.scala:
##########
@@ -45,26 +41,15 @@ import org.apache.spark.sql.types.StructType
* @param parameters
*/
// TODO(yihua): handle V1/V2 checkpoint
Review Comment:
Yeah. Will do a separate PR for this.
##########
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:
sg.
--
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]