Skip to content

Commit 6817dec

Browse files
committed
Set the default max age to 1 week.
1 parent a371f05 commit 6817dec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamOptions.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ class FileStreamOptions(@transient private val parameters: Map[String, String])
3636
}
3737
}
3838

39-
/** Maximum age of a file that can be found in this directory, before it is deleted. */
39+
/**
40+
* Maximum age of a file that can be found in this directory, before it is deleted.
41+
* Default to a week.
42+
*/
4043
val maxFileAgeMs: Long =
41-
Utils.timeStringAsMs(parameters.getOrElse("maxFileAge", "24h"))
44+
Utils.timeStringAsMs(parameters.getOrElse("maxFileAge", "7d"))
4245

4346
/** Options as specified by the user, in a case-insensitive map, without "path" set. */
4447
val optionMapWithoutPath: Map[String, String] =

0 commit comments

Comments
 (0)