-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-35565][SS] Add config for ignoring metadata directory of FileStreamSink #32702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,12 +360,15 @@ case class DataSource( | |
| baseRelation | ||
|
|
||
| // We are reading from the results of a streaming query. Load files from the metadata log | ||
| // instead of listing them using HDFS APIs. | ||
| // instead of listing them using HDFS APIs. Note that the config | ||
| // `spark.sql.streaming.fileStreamSink.metadata.ignored` can be enabled to ignore the | ||
| // metadata log. | ||
| case (format: FileFormat, _) | ||
| if FileStreamSink.hasMetadata( | ||
| caseInsensitiveOptions.get("path").toSeq ++ paths, | ||
| newHadoopConfiguration(), | ||
| sparkSession.sessionState.conf) => | ||
| if !sparkSession.sessionState.conf.fileStreamSinkMetadataIgnored && | ||
|
||
| FileStreamSink.hasMetadata( | ||
| caseInsensitiveOptions.get("path").toSeq ++ paths, | ||
| newHadoopConfiguration(), | ||
| sparkSession.sessionState.conf) => | ||
| val basePath = new Path((caseInsensitiveOptions.get("path").toSeq ++ paths).head) | ||
| val fileCatalog = new MetadataLogFileIndex(sparkSession, basePath, | ||
| caseInsensitiveOptions, userSpecifiedSchema) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the guideline for naming configurations, maybe the config can be named like
spark.sql.streaming.fileStreamSink.ignoreMetadataorspark.sql.streaming.fileStreamSink.formatCheck.enabled, or any other good names :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally
spark.sql.streaming.fileStreamSink.ignoreMetadatasounds better. I couldn't get whatformatCheckmeans intuitively.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spark.sql.streaming.fileStreamSink.ignoreMetadatasounds good.