diff options
author | Sean Owen <sowen@cloudera.com> | 2014-06-22 11:47:49 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-06-22 11:47:49 -0700 |
commit | 9fe28c35df0dc8ac4a54db2a528fb7ae56d3f978 (patch) | |
tree | 07f019b3f5e3f3f1a49f3bf17d2182b9d4848574 /core/src/main/scala | |
parent | 476581e8c8ca03a5940c404fee8a06361ff94cb5 (diff) | |
download | spark-9fe28c35df0dc8ac4a54db2a528fb7ae56d3f978.tar.gz spark-9fe28c35df0dc8ac4a54db2a528fb7ae56d3f978.tar.bz2 spark-9fe28c35df0dc8ac4a54db2a528fb7ae56d3f978.zip |
SPARK-1316. Remove use of Commons IO
Commons IO is actually barely used, and is not a declared dependency. This just replaces with equivalents from the JDK and Guava.
Author: Sean Owen <sowen@cloudera.com>
Closes #1173 from srowen/SPARK-1316 and squashes the following commits:
2eb53db [Sean Owen] Reorder Guava import
8fde404 [Sean Owen] Remove use of Commons IO, which is not actually a dependency
Diffstat (limited to 'core/src/main/scala')
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/logging/RollingFileAppender.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/logging/RollingFileAppender.scala b/core/src/main/scala/org/apache/spark/util/logging/RollingFileAppender.scala index 1bbbd20cf0..e579421676 100644 --- a/core/src/main/scala/org/apache/spark/util/logging/RollingFileAppender.scala +++ b/core/src/main/scala/org/apache/spark/util/logging/RollingFileAppender.scala @@ -19,7 +19,7 @@ package org.apache.spark.util.logging import java.io.{File, FileFilter, InputStream} -import org.apache.commons.io.FileUtils +import com.google.common.io.Files import org.apache.spark.SparkConf import RollingFileAppender._ @@ -83,7 +83,7 @@ private[spark] class RollingFileAppender( logDebug(s"Attempting to rollover file $activeFile to file $rolloverFile") if (activeFile.exists) { if (!rolloverFile.exists) { - FileUtils.moveFile(activeFile, rolloverFile) + Files.move(activeFile, rolloverFile) logInfo(s"Rolled over $activeFile to $rolloverFile") } else { // In case the rollover file name clashes, make a unique file name. @@ -100,7 +100,7 @@ private[spark] class RollingFileAppender( logWarning(s"Rollover file $rolloverFile already exists, " + s"rolled over $activeFile to file $altRolloverFile") - FileUtils.moveFile(activeFile, altRolloverFile) + Files.move(activeFile, altRolloverFile) } } else { logWarning(s"File $activeFile does not exist") |