diff options
author | Prashant Sharma <prashant.s@imaginea.com> | 2014-01-06 15:51:32 +0530 |
---|---|---|
committer | Prashant Sharma <prashant.s@imaginea.com> | 2014-01-07 13:01:43 +0530 |
commit | b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96 (patch) | |
tree | 9706de049596de188057bd41e6379aa9298d5efb /core/src | |
parent | b3018811e106e6414816380a35c07a8564945d37 (diff) | |
download | spark-b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96.tar.gz spark-b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96.tar.bz2 spark-b84dc780d3ad3fc2f0f1e9ba3fd1676447c65e96.zip |
Allow configuration to be printed in logs for diagnosis.
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/org/apache/spark/SparkContext.scala | 4 |
1 files changed, 4 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") |