GitHub user keypointt opened a pull request:
https://github.com/apache/spark/pull/16643
[SPARK-17724][Streaming][WebUI] Unevaluated new lines in tooltip in DAG
Visualization of a job
https://issues.apache.org/jira/browse/SPARK-17724
## What changes were proposed in this pull request?
For unevaluated `\n`, evaluate it and enable line break, for Streaming
WebUI `stages` page and `job` page.
(I didn't change Scala source file, since Jetty server has to somehow
indicate line break and js to code display it.)
(This PR is a continue from previous PR
https://github.com/apache/spark/pull/15353 for the same issue, sorry being so
long time)
Three changes:
1. RDD Node tooltipText is actually showing the `<circle>` `title`
property, so I set extra attribute in `spark-dag-viz.js`: `.attr("data-html",
"true")`
`<circle x="-5" y="-5" r="5" data-toggle="tooltip" data-placement="bottom"
title="" data-original-title="ParallelCollectionRDD [9]\nmakeRDD at
QueueStream.scala:49"></circle>`
2. Static `<tspan>` text of each stage, split by `/n`, and append an extra
`<tspan>` element to its parentNode
`<text><tspan xml:space="preserve" dy="1em" x="1">reduceByKey</tspan><tspan
xml:space="preserve" dy="1em" x="1">reduceByKey/n@ 23:34:49</tspan></text>
`
3. Also, I removed some unused imports and semicolons found when tracing
code.
## UI changes
Screenshot **before fix**, `\n` is not evaluated in both circle tooltipText
and static text:

Screenshot **after fix**:

## How was this patch tested?
Tested locally. For Streaming WebUI `stages` page and `job` page, on
multiple browsers:
- Chrome
- Firefox
- Safari
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/keypointt/spark SPARK-17724-2nd
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16643.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16643
----
commit f47a2e30887ea23f2b10e08090df31bc64948d1b
Author: Xin Ren <[email protected]>
Date: 2017-01-12T06:31:08Z
[SPARK-17724] remove unsued import, syntax
commit e5082567a0800bcfffe1db3fea59968bfa7102ba
Author: Xin Ren <[email protected]>
Date: 2017-01-12T08:05:00Z
remove comma
commit 77f1ca3827cb89d69fa41390ba6d8a8045e507a6
Author: Xin Ren <[email protected]>
Date: 2017-01-14T04:45:48Z
[SPARK-17724] node circle tootipText, line break working
commit 2513d156441b386094067694a704c635daf7c76a
Author: Xin Ren <[email protected]>
Date: 2017-01-14T05:08:31Z
[SPARK-17724] remvoe space
commit 644630dbaa76d05b64abbc81fe649644660de2f1
Author: Xin Ren <[email protected]>
Date: 2017-01-16T09:00:50Z
[SPARK-17724] css and general function
commit 4fc62193d5f9581d3cc12bb98a21c2cbb20318d3
Author: Xin Ren <[email protected]>
Date: 2017-01-17T08:29:13Z
[SPARK-17724] css effort to set data-html be true, is not possible, this is
new html5 attr
commit c1252d513e7fdb7318e93f67ceb39a42b3e88004
Author: Xin Ren <[email protected]>
Date: 2017-01-18T08:38:25Z
[SPARK-17724] tmp save
commit e6f7fd1f9d3bfedb0d4de0488a7da5c07e7d2b3c
Author: Xin Ren <[email protected]>
Date: 2017-01-19T07:46:12Z
[SPARK-17724] enable static tspan line break
commit 22861c56a15cad53d728a86cd311df24ab181ce2
Author: Xin Ren <[email protected]>
Date: 2017-01-19T07:56:41Z
[SPARK-17724] more comment
----
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]