Skip to content

Commit cb52f2b

Browse files
Kelvin ChuEvan Chan
authored andcommitted
Change the name of findOldestFiles() to findOldFiles()
1 parent 72f7d2d commit cb52f2b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private[spark] class Worker(
196196
// Spin up a separate thread (in a future) to do the dir cleanup; don't tie up worker actor
197197
val cleanupFuture = concurrent.future {
198198
logInfo("Cleaning up oldest application directories in " + workDir + " ...")
199-
Utils.findOldestFiles(workDir, APP_DATA_RETENTION_SECS)
199+
Utils.findOldFiles(workDir, APP_DATA_RETENTION_SECS)
200200
.foreach(Utils.deleteRecursively(_))
201201
}
202202
cleanupFuture onFailure {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ private[spark] object Utils extends Logging {
541541
* @param dir must be the path to a directory, or IllegalArgumentException is thrown
542542
* @param cutoff measured in seconds. Files older than this are returned.
543543
*/
544-
def findOldestFiles(dir: File, cutoff: Long): Seq[File] = {
544+
def findOldFiles(dir: File, cutoff: Long): Seq[File] = {
545545
val currentTimeSecs = System.currentTimeMillis / 1000
546546
if (dir.isDirectory) {
547547
val files = listFilesSafely(dir)

core/src/test/scala/org/apache/spark/util/UtilsSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class UtilsSuite extends FunSuite {
155155
assert(Utils.getIteratorSize(iterator) === 5L)
156156
}
157157

158-
test("findOldestFiles") {
158+
test("findOldFiles") {
159159
// create some temporary directories and files
160160
val parent: File = Utils.createTempDir()
161161
val child1: File = Utils.createTempDir(parent.getCanonicalPath) // The parent directory has two child directories

0 commit comments

Comments
 (0)