diff options
author | Josh Rosen <joshrosen@apache.org> | 2014-07-26 00:54:05 -0700 |
---|---|---|
committer | Matei Zaharia <matei@databricks.com> | 2014-07-26 00:54:05 -0700 |
commit | cf3e9fd84dc64f8a57ecbcfdd6b22f5492d41bd7 (patch) | |
tree | 7ebad9c0997a0a28d2f5eead2a0ae6a63b116bc3 /python | |
parent | 8904791230a0fae336db93e5a80f65c4d9d584dc (diff) | |
download | spark-cf3e9fd84dc64f8a57ecbcfdd6b22f5492d41bd7.tar.gz spark-cf3e9fd84dc64f8a57ecbcfdd6b22f5492d41bd7.tar.bz2 spark-cf3e9fd84dc64f8a57ecbcfdd6b22f5492d41bd7.zip |
[SPARK-1458] [PySpark] Expose sc.version in Java and PySpark
Author: Josh Rosen <joshrosen@apache.org>
Closes #1596 from JoshRosen/spark-1458 and squashes the following commits:
fdbb0bf [Josh Rosen] Add SparkContext.version to Python & Java [SPARK-1458]
Diffstat (limited to 'python')
-rw-r--r-- | python/pyspark/context.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py index 024fb88187..bdf14ea0ee 100644 --- a/python/pyspark/context.py +++ b/python/pyspark/context.py @@ -217,6 +217,13 @@ class SparkContext(object): SparkContext._jvm.java.lang.System.setProperty(key, value) @property + def version(self): + """ + The version of Spark on which this application is running. + """ + return self._jsc.version() + + @property def defaultParallelism(self): """ Default level of parallelism to use when not given by user (e.g. for |