Github user pierre-borckmans commented on a diff in the pull request:
https://github.com/apache/spark/pull/600#discussion_r12160496
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -1037,6 +1037,11 @@ private[spark] object Utils extends Logging {
obj.getClass.getSimpleName.replace("$", "")
}
+ /** Return the current version of Spark */
+ def getSparkVersion(): String = {
+ getClass.getPackage.getImplementationVersion
--- End diff --
Indeed.
I confirm that both ``sbt assembly`` and ``mvn package``produce a fat jar
in which the manifest contains the version.
```
unzip -p
assembly/target/scala-2.10/spark-assembly-1.0.0-SNAPSHOT-hadoop2.0.0-mr1-cdh4.4.0.jar
META-INF/MANIFEST.MF
```
outputs:
```
Implementation-Vendor: The Apache Software Foundation
Implementation-Title: Spark Project Core
Implementation-Version: 1.0.0-SNAPSHOT
Implementation-Vendor-Id: org.apache.spark
Built-By: ria
Build-Jdk: 1.6.0_27
Specification-Vendor: The Apache Software Foundation
Specification-Title: Spark Project Core
Created-By: Apache Maven 3.0.4
Specification-Version: 1.0.0-SNAPSHOT
Archiver-Version: Plexus Archiver
```
in both cases
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---