aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashant Sharma <prashant.s@imaginea.com>2014-01-06 15:51:32 +0530
committerPrashant Sharma <prashant.s@imaginea.com>2014-01-07 13:01:43 +0530
commitb84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96 (patch)
tree9706de049596de188057bd41e6379aa9298d5efb
parentb3018811e106e6414816380a35c07a8564945d37 (diff)
downloadspark-b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96.tar.gz
spark-b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96.tar.bz2
spark-b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96.zip
Allow configuration to be printed in logs for diagnosis.
-rw-r--r--core/src/main/scala/org/apache/spark/SparkContext.scala4
-rw-r--r--docs/configuration.md7
2 files changed, 11 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/SparkContext.scala b/core/src/main/scala/org/apache/spark/SparkContext.scala
index e80e43af6d..99dcced7d7 100644
--- a/core/src/main/scala/org/apache/spark/SparkContext.scala
+++ b/core/src/main/scala/org/apache/spark/SparkContext.scala
@@ -116,6 +116,10 @@ class SparkContext(
throw new SparkException("An application must be set in your configuration")
}
+ if (conf.get("spark.log-conf", "false").toBoolean) {
+ logInfo("Spark configuration:\n" + conf.toDebugString)
+ }
+
// Set Spark driver host and port system properties
conf.setIfMissing("spark.driver.host", Utils.localHostName())
conf.setIfMissing("spark.driver.port", "0")
diff --git a/docs/configuration.md b/docs/configuration.md
index 8a8857bb3b..f00fe05476 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -403,6 +403,13 @@ Apart from these, the following properties are also available, and may be useful
How many times slower a task is than the median to be considered for speculation.
</td>
</tr>
+<tr>
+ <td>spark.log-conf</td>
+ <td>false</td>
+ <td>
+ Log the supplied SparkConf as INFO at start of spark context.
+ </td>
+</tr>
</table>
## Viewing Spark Properties