-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-3454] Expose JSON representation of data shown in WebU #2333
Conversation
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
3cbb461
to
b8578a7
Compare
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
QA tests have started for PR 2333 at commit
|
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
@@ -26,6 +29,23 @@ import org.apache.spark.ui.{UIUtils, WebUIPage} | |||
private[ui] class EnvironmentPage(parent: EnvironmentTab) extends WebUIPage("") { | |||
private val listener = parent.listener | |||
|
|||
override def renderJson(request: HttpServletRequest): JValue = { | |||
val jvmInfoJson = | |||
("RUntime Informationf" -> listener.jvmInformation.foldLeft(JObject())(_ ~ _)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of typos in this line...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you show what the final JSON looks like? Since this is a map it might be good to convert this faithfully, e.g.
{
"Spark Properties": {
"spark.master":"local"
"spark.app.name":"spark-shell"
...
}
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the result of JSON for environment.
{
"Runtime Information" : {
"Java Home" : "/usr/java/jdk1.7.0_65/jre",
"Java Version" : "1.7.0_65 (Oracle Corporation)",
"Scala Version" : "version 2.10.4"
},
"Spark Properties" : {
"spark.serializer" : "org.apache.spark.serializer.KryoSerializer",
...
"spark.tachyonStore.folderName" : "spark-a8ac134b-187d-4d4b-b9ef-140e626ee96c"
},
"System Properties" : {
"java.io.tmpdir" : "/tmp",
...
"java.version" : "1.7.0_65",
"sun.io.unicode.encoding" : "UnicodeLittle"
},
"Classpath Entries" : {
"/home/sarutak/work/spark/sql/hive/target/scala-2.10/test-classes" : "System Classpath",
...
"/home/sarutak/work/spark/assembly/target/scala-2.10/spark-assembly-1.1.0-SNAPSHOT-hadoop2.2.0.jar" : "System Classpath"
}
}
QA tests have started for PR 2333 at commit
|
@andrewor14 Thank you for reviewing this PR. |
QA tests have finished for PR 2333 at commit
|
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
test this please. |
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
Can anyone review this if you have time? |
test this please. |
QA tests have started for PR 2333 at commit
|
QA tests have finished for PR 2333 at commit
|
@sarutak, I believe @JoshRosen is working on a more general framework for extracting the info displayed on the UI as JSON, so there's a chance that we won't go with the approach here. Just a heads up. |
@andrewor14 Thank you for notification! |
@sarutak In the long run, I'd be interested in re-writing the UI in terms of a richer REST API that exposes data as JSON, exactly for the visualization use-case that you mentioned. This change (Javascript-based rendering, etc) is blocked by a couple of other features right now. I'm swamped with a bunch of other work, but I'll try to get a public design draft posted in the next couple of days. |
Thanks @JoshRosen ! |
I've opened SPARK-3644 as a forum for discussing the design of a REST API; sorry for the delay. |
Thank you for you work @JoshRosen ! |
Hi @sarutak thanks for your work on this. Josh's other PR #2696 has been merged for a while now. I'm gonna take another crack at implementing this on top of the lastest changes and getting this integrated into the history server too. Can you please close this PR (unless you are planning on updating it in the very near future)? Hopefully that will let your other PR #2342 to get merged in -- looks really cool! |
OK. I close this PR. |
No description provided.