HeartSaVioR commented on a change in pull request #26590: [SPARK-29953][SS] 
Don't clean up source files for FileStreamSource if the files belong to the 
output of FileStreamSink
URL: https://github.com/apache/spark/pull/26590#discussion_r347726718
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala
 ##########
 @@ -342,11 +343,49 @@ object FileStreamSource {
     def size: Int = map.size()
   }
 
-  private[sql] trait FileStreamSourceCleaner {
-    def clean(entry: FileEntry): Unit
+  private[sql] abstract class FileStreamSourceCleaner(
+      val fileSystem: FileSystem,
+      val sourcePath: Path) extends Logging {
+
+    private val srcPathToContainFileStreamSinkMetadata = new 
mutable.HashMap[Path, Boolean]
 
 Review comment:
   This is a cache storing the result of check whether the dir contains 
metadata dir or not, as we may not want to do the check per batch. This is 
based on the assumption that a directory won't be changed from having metadata 
to not having metadata or vice versa, but please let me know if the assumption 
doesn't sound safe. I'll remove the cache and check per batch.

----------------------------------------------------------------
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.
 
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]

Reply via email to