vanzin commented on a change in pull request #22952: [SPARK-20568][SS] Provide 
option to clean up completed files in streaming query
URL: https://github.com/apache/spark/pull/22952#discussion_r341358256
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala
 ##########
 @@ -53,6 +55,18 @@ class FileStreamSource(
     fs.makeQualified(new Path(path))  // can contain glob patterns
   }
 
+  private val sourceCleaner: FileStreamSourceCleaner = {
 
 Review comment:
   I wasn't going to ask, but since I have more comments... I think it's better 
if this were an `Option` and set to `None` if the cleaner is off.
   
   Similarly, below, you'll resolve the `sourceArchiveDir` even if the cleaner 
is not set to `archive`, which is not necessary.
   
   (I'm almost suggesting that there should be a separate implementation for 
`delete` and for `archive` to make this, and the code calling it, a bit 
cleaner.)

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