Skip to content

Commit

Permalink
Change the name of findOldestFiles() to findOldFiles()
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 72f7d2d commit cb52f2b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private[spark] class Worker(
// Spin up a separate thread (in a future) to do the dir cleanup; don't tie up worker actor
val cleanupFuture = concurrent.future {
logInfo("Cleaning up oldest application directories in " + workDir + " ...")
Utils.findOldestFiles(workDir, APP_DATA_RETENTION_SECS)
Utils.findOldFiles(workDir, APP_DATA_RETENTION_SECS)
.foreach(Utils.deleteRecursively(_))
}
cleanupFuture onFailure {
Expand Down
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 @@ -541,7 +541,7 @@ private[spark] object Utils extends Logging {
* @param dir must be the path to a directory, or IllegalArgumentException is thrown
* @param cutoff measured in seconds. Files older than this are returned.
*/
def findOldestFiles(dir: File, cutoff: Long): Seq[File] = {
def findOldFiles(dir: File, cutoff: Long): Seq[File] = {
val currentTimeSecs = System.currentTimeMillis / 1000
if (dir.isDirectory) {
val files = listFilesSafely(dir)
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/org/apache/spark/util/UtilsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class UtilsSuite extends FunSuite {
assert(Utils.getIteratorSize(iterator) === 5L)
}

test("findOldestFiles") {
test("findOldFiles") {
// create some temporary directories and files
val parent: File = Utils.createTempDir()
val child1: File = Utils.createTempDir(parent.getCanonicalPath) // The parent directory has two child directories
Expand Down

0 comments on commit cb52f2b

Please sign in to comment.