Skip to content

Commit 553d8c2

Browse files
Kelvin ChuEvan Chan
authored andcommitted
change the variable name to currentTimeMillis since it actually tracks in seconds
1 parent 8dc9cb5 commit 553d8c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ private[spark] object Utils extends Logging {
542542
* @param cutoff measured in seconds. Files older than this are returned.
543543
*/
544544
def findOldFiles(dir: File, cutoff: Long): Seq[File] = {
545-
val currentTimeSecs = System.currentTimeMillis
545+
val currentTimeMillis = System.currentTimeMillis
546546
if (dir.isDirectory) {
547547
val files = listFilesSafely(dir)
548-
files.filter { file => file.lastModified < (currentTimeSecs - cutoff * 1000) }
548+
files.filter { file => file.lastModified < (currentTimeMillis - cutoff * 1000) }
549549
} else {
550550
throw new IllegalArgumentException(dir + " is not a directory!")
551551
}

0 commit comments

Comments
 (0)