Skip to content

Commit

Permalink
change the variable name to currentTimeMillis since it actually track…
Browse files Browse the repository at this point in the history
…s in seconds
  • Loading branch information
Kelvin Chu authored and Evan Chan committed Apr 3, 2014
1 parent 8dc9cb5 commit 553d8c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,10 @@ private[spark] object Utils extends Logging {
* @param cutoff measured in seconds. Files older than this are returned.
*/
def findOldFiles(dir: File, cutoff: Long): Seq[File] = {
val currentTimeSecs = System.currentTimeMillis
val currentTimeMillis = System.currentTimeMillis
if (dir.isDirectory) {
val files = listFilesSafely(dir)
files.filter { file => file.lastModified < (currentTimeSecs - cutoff * 1000) }
files.filter { file => file.lastModified < (currentTimeMillis - cutoff * 1000) }
} else {
throw new IllegalArgumentException(dir + " is not a directory!")
}
Expand Down

0 comments on commit 553d8c2

Please sign in to comment.