You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/10/11 03:41:50 UTC
git commit: [SPARK-2924] Required by scala 2.11,
only one fun/ctor amongst overriden alternatives,
can have default argument(s).
Repository: spark
Updated Branches:
refs/heads/master 1d72a3087 -> 0e8203f4f
[SPARK-2924] Required by scala 2.11, only one fun/ctor amongst overriden alternatives, can have default argument(s).
...riden alternatives, can have default argument.
Author: Prashant Sharma <pr...@imaginea.com>
Closes #2750 from ScrapCodes/SPARK-2924/default-args-removed and squashes the following commits:
d9785c3 [Prashant Sharma] [SPARK-2924] Required by scala 2.11, only one function/ctor amongst overriden alternatives, can have default argument.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0e8203f4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0e8203f4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0e8203f4
Branch: refs/heads/master
Commit: 0e8203f4fb721158fb27897680da476174d24c4b
Parents: 1d72a30
Author: Prashant Sharma <pr...@imaginea.com>
Authored: Fri Oct 10 18:39:55 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Fri Oct 10 18:39:55 2014 -0700
----------------------------------------------------------------------
.../scala/org/apache/spark/util/FileLogger.scala | 19 +++++++++++++++++--
.../org/apache/spark/util/FileLoggerSuite.scala | 8 ++++----
2 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/0e8203f4/core/src/main/scala/org/apache/spark/util/FileLogger.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/util/FileLogger.scala b/core/src/main/scala/org/apache/spark/util/FileLogger.scala
index 6d1fc05..fdc73f0 100644
--- a/core/src/main/scala/org/apache/spark/util/FileLogger.scala
+++ b/core/src/main/scala/org/apache/spark/util/FileLogger.scala
@@ -51,12 +51,27 @@ private[spark] class FileLogger(
def this(
logDir: String,
sparkConf: SparkConf,
- compress: Boolean = false,
- overwrite: Boolean = true) = {
+ compress: Boolean,
+ overwrite: Boolean) = {
this(logDir, sparkConf, SparkHadoopUtil.get.newConfiguration(sparkConf), compress = compress,
overwrite = overwrite)
}
+ def this(
+ logDir: String,
+ sparkConf: SparkConf,
+ compress: Boolean) = {
+ this(logDir, sparkConf, SparkHadoopUtil.get.newConfiguration(sparkConf), compress = compress,
+ overwrite = true)
+ }
+
+ def this(
+ logDir: String,
+ sparkConf: SparkConf) = {
+ this(logDir, sparkConf, SparkHadoopUtil.get.newConfiguration(sparkConf), compress = false,
+ overwrite = true)
+ }
+
private val dateFormat = new ThreadLocal[SimpleDateFormat]() {
override def initialValue(): SimpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss")
}
http://git-wip-us.apache.org/repos/asf/spark/blob/0e8203f4/core/src/test/scala/org/apache/spark/util/FileLoggerSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/util/FileLoggerSuite.scala b/core/src/test/scala/org/apache/spark/util/FileLoggerSuite.scala
index dc2a056..72466a3 100644
--- a/core/src/test/scala/org/apache/spark/util/FileLoggerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/util/FileLoggerSuite.scala
@@ -74,13 +74,13 @@ class FileLoggerSuite extends FunSuite with BeforeAndAfter {
test("Logging when directory already exists") {
// Create the logging directory multiple times
- new FileLogger(logDirPathString, new SparkConf, overwrite = true).start()
- new FileLogger(logDirPathString, new SparkConf, overwrite = true).start()
- new FileLogger(logDirPathString, new SparkConf, overwrite = true).start()
+ new FileLogger(logDirPathString, new SparkConf, compress = false, overwrite = true).start()
+ new FileLogger(logDirPathString, new SparkConf, compress = false, overwrite = true).start()
+ new FileLogger(logDirPathString, new SparkConf, compress = false, overwrite = true).start()
// If overwrite is not enabled, an exception should be thrown
intercept[IOException] {
- new FileLogger(logDirPathString, new SparkConf, overwrite = false).start()
+ new FileLogger(logDirPathString, new SparkConf, compress = false, overwrite = false).start()
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org