aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/scala/org/apache/spark/SparkEnv.scala18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/src/main/scala/org/apache/spark/SparkEnv.scala b/core/src/main/scala/org/apache/spark/SparkEnv.scala
index 19d507c0cf..720151a6b0 100644
--- a/core/src/main/scala/org/apache/spark/SparkEnv.scala
+++ b/core/src/main/scala/org/apache/spark/SparkEnv.scala
@@ -278,10 +278,11 @@ object SparkEnv extends Logging {
addedJars: Seq[String],
addedFiles: Seq[String]): Map[String, Seq[(String, String)]] = {
+ import Properties._
val jvmInformation = Seq(
- ("Java Version", "%s (%s)".format(Properties.javaVersion, Properties.javaVendor)),
- ("Java Home", Properties.javaHome),
- ("Scala Version", Properties.versionString)
+ ("Java Version", s"$javaVersion ($javaVendor)"),
+ ("Java Home", javaHome),
+ ("Scala Version", versionString)
).sorted
// Spark properties
@@ -296,18 +297,15 @@ object SparkEnv extends Logging {
// System properties that are not java classpaths
val systemProperties = System.getProperties.iterator.toSeq
- val otherProperties = systemProperties.filter { case (k, v) =>
+ val otherProperties = systemProperties.filter { case (k, _) =>
k != "java.class.path" && !k.startsWith("spark.")
}.sorted
// Class paths including all added jars and files
- val classPathProperty = systemProperties.find { case (k, v) =>
- k == "java.class.path"
- }.getOrElse(("", ""))
- val classPathEntries = classPathProperty._2
+ val classPathEntries = javaClassPath
.split(File.pathSeparator)
- .filterNot(e => e.isEmpty)
- .map(e => (e, "System Classpath"))
+ .filterNot(_.isEmpty)
+ .map((_, "System Classpath"))
val addedJarsAndFiles = (addedJars ++ addedFiles).map((_, "Added By User"))
val classPaths = (addedJarsAndFiles ++ classPathEntries).sorted