aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2013-07-14 10:37:26 -0700
committerPatrick Wendell <pwendell@gmail.com>2013-07-14 10:37:26 -0700
commit4883586838b960c405af208262aed3ec4b078613 (patch)
treebc4baeda755270a2eae283edfe36ea59b4f404ab /core
parentddb97f0fdf16442afaa9cab656376267e4044510 (diff)
downloadspark-4883586838b960c405af208262aed3ec4b078613.tar.gz
spark-4883586838b960c405af208262aed3ec4b078613.tar.bz2
spark-4883586838b960c405af208262aed3ec4b078613.zip
Responding to Matei's review
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/spark/ui/env/EnvironmentUI.scala21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/src/main/scala/spark/ui/env/EnvironmentUI.scala b/core/src/main/scala/spark/ui/env/EnvironmentUI.scala
index 8a3b330405..6b8b9f05bb 100644
--- a/core/src/main/scala/spark/ui/env/EnvironmentUI.scala
+++ b/core/src/main/scala/spark/ui/env/EnvironmentUI.scala
@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletRequest
import org.eclipse.jetty.server.Handler
import scala.collection.JavaConversions._
+import scala.util.Properties
import spark.ui.JettyUtils._
import spark.ui.UIUtils.headerSparkPage
@@ -21,19 +22,27 @@ private[spark] class EnvironmentUI(sc: SparkContext) {
)
def envDetails(request: HttpServletRequest): Seq[Node] = {
- val properties = System.getProperties.iterator.toSeq
+ val jvmInformation = Seq(
+ ("Java Version", "%s (%s)".format(Properties.javaVersion, Properties.javaVendor)),
+ ("Java Home", Properties.javaHome),
+ ("Scala Version", Properties.versionString),
+ ("Scala Home", Properties.scalaHome)
+ )
+ def jvmRow(kv: (String, String)) = <tr><td>{kv._1}</td><td>{kv._2}</td></tr>
+ def jvmTable = UIUtils.listingTable(Seq("Name", "Value"), jvmRow, jvmInformation)
+ val properties = System.getProperties.iterator.toSeq
val classPathProperty = properties
.filter{case (k, v) => k.contains("java.class.path")}
.headOption
.getOrElse("", "")
- val sparkProperties = properties.filter(_._1.contains("spark"))
+ val sparkProperties = properties.filter(_._1.startsWith("spark"))
val otherProperties = properties.diff(sparkProperties :+ classPathProperty)
val propertyHeaders = Seq("Name", "Value")
def propertyRow(kv: (String, String)) = <tr><td>{kv._1}</td><td>{kv._2}</td></tr>
- val propertyTable = UIUtils.listingTable(
- propertyHeaders, propertyRow, sparkProperties ++ otherProperties)
+ val sparkPropertyTable = UIUtils.listingTable(propertyHeaders, propertyRow, sparkProperties)
+ val otherPropertyTable = UIUtils.listingTable(propertyHeaders, propertyRow, otherProperties)
val classPathEntries = classPathProperty._2
.split(System.getProperty("path.separator", ":"))
@@ -49,7 +58,9 @@ private[spark] class EnvironmentUI(sc: SparkContext) {
val content =
<span>
- <h2>System Properties</h2> {propertyTable}
+ <h2>Runtime Information</h2> {jvmTable}
+ <h2>Spark Properties</h2> {sparkPropertyTable}
+ <h2>System Properties</h2> {otherPropertyTable}
<h2>Classpath Entries</h2> {classPathTable}
</span>