You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/20 06:35:03 UTC

[GitHub] mikedias commented on a change in pull request #18410: [SPARK-20971][SS] purge metadata log in FileStreamSource

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org