Skip to content

Commit

Permalink
Fixed a bug in Utils.findOldFiles() after merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelvin Chu authored and Evan Chan committed Apr 3, 2014
1 parent cb52f2b commit 8dc9cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ 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 / 1000
val currentTimeSecs = System.currentTimeMillis
if (dir.isDirectory) {
val files = listFilesSafely(dir)
files.filter { file => file.lastModified < (currentTimeSecs - cutoff * 1000) }
Expand Down

0 comments on commit 8dc9cb5

Please sign in to comment.