mikedias commented on a change in pull request #18410: [SPARK-20971][SS] purge
metadata log in FileStreamSource
URL: https://github.com/apache/spark/pull/18410#discussion_r258348785
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala
##########
@@ -256,8 +259,9 @@ class FileStreamSource(
* equal to `end` and will only request offsets greater than `end` in the
future.
*/
override def commit(end: Offset): Unit = {
- // No-op for now; FileStreamSource currently garbage-collects files based
on timestamp
- // and the value of the maxFileAge parameter.
+ if (currentLogOffset > minBatchesToRetain) {
+ metadataLog.purge(currentLogOffset - minBatchesToRetain)
Review comment:
What would be the behavior of this when
`spark.sql.streaming.fileSource.log.deletion=false`? Looks like
`HDFSMetadataLog.purge` will always delete the files.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]