aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2014-05-14 12:53:30 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-05-14 12:53:30 -0700
commit65533c7ec03e7eedf5cd9756822863ab6f034ec9 (patch)
tree2e38fd31110104f185233c7c7ac26fcba47d53c8 /core
parenta3315d7f4c7584dae2ee0aa33c6ec9e97b229b48 (diff)
downloadspark-65533c7ec03e7eedf5cd9756822863ab6f034ec9.tar.gz
spark-65533c7ec03e7eedf5cd9756822863ab6f034ec9.tar.bz2
spark-65533c7ec03e7eedf5cd9756822863ab6f034ec9.zip
SPARK-1833 - Have an empty SparkContext constructor.
This is nicer than relying on new SparkContext(new SparkConf()) Author: Patrick Wendell <pwendell@gmail.com> Closes #774 from pwendell/spark-context and squashes the following commits: ef9f12f [Patrick Wendell] SPARK-1833 - Have an empty SparkContext constructor.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/SparkContext.scala6
1 files changed, 6 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 032b3d744c..634c10c33f 100644
--- a/core/src/main/scala/org/apache/spark/SparkContext.scala
+++ b/core/src/main/scala/org/apache/spark/SparkContext.scala
@@ -67,6 +67,12 @@ class SparkContext(config: SparkConf) extends Logging {
private[spark] var preferredNodeLocationData: Map[String, Set[SplitInfo]] = Map()
/**
+ * Create a SparkContext that loads settings from system properties (for instance, when
+ * launching with ./bin/spark-submit).
+ */
+ def this() = this(new SparkConf())
+
+ /**
* :: DeveloperApi ::
* Alternative constructor for setting preferred locations where Spark will create executors.
*