aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/org
diff options
context:
space:
mode:
authoruncleGen <hustyugm@gmail.com>2017-01-25 17:18:13 -0800
committerReynold Xin <rxin@databricks.com>2017-01-25 17:18:13 -0800
commit2338451266d37b4c952827325cdee53b3e8fbc78 (patch)
treed00d0ba08e39a9941dfec37ae2ba1a523e2ce71f /core/src/main/scala/org
parent47d5d0ddb06c7d2c86515d9556c41dc80081f560 (diff)
downloadspark-2338451266d37b4c952827325cdee53b3e8fbc78.tar.gz
spark-2338451266d37b4c952827325cdee53b3e8fbc78.tar.bz2
spark-2338451266d37b4c952827325cdee53b3e8fbc78.zip
[SPARK-18495][UI] Document meaning of green dot in DAG visualization
## What changes were proposed in this pull request? A green dot in the DAG visualization apparently means that the referenced RDD is cached. This is not documented anywhere except in this [blog post](https://databricks.com/blog/2015/06/22/understanding-your-spark-application-through-visualization.html). It would be good if the Web UI itself documented this somehow (perhaps in the tooltip?) so that the user can naturally learn what it means while using the Web UI. before pr: ![dingtalk20170125180158](https://cloud.githubusercontent.com/assets/7402327/22286167/37910ea2-e329-11e6-9aae-03dce6fceee2.png) ![dingtalk20170125180218](https://cloud.githubusercontent.com/assets/7402327/22286178/421f3132-e329-11e6-8283-ba6bbd15cfb0.png) after pr: ![dingtalk20170125175704](https://cloud.githubusercontent.com/assets/7402327/22286216/56a0050a-e329-11e6-813d-2be96b5ab7f1.png) ![dingtalk20170125175749](https://cloud.githubusercontent.com/assets/7402327/22286233/618cd646-e329-11e6-9ce5-10322b169dcb.png) ## How was this patch tested? Author: uncleGen <hustyugm@gmail.com> Closes #16702 from uncleGen/SPARK-18495.
Diffstat (limited to 'core/src/main/scala/org')
-rw-r--r--core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala b/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
index 0e330879d5..43bfe0aacf 100644
--- a/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
+++ b/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
@@ -222,7 +222,12 @@ private[ui] object RDDOperationGraph extends Logging {
/** Return the dot representation of a node in an RDDOperationGraph. */
private def makeDotNode(node: RDDOperationNode): String = {
- val label = s"${node.name} [${node.id}]\n${node.callsite}"
+ val isCached = if (node.cached) {
+ " [Cached]"
+ } else {
+ ""
+ }
+ val label = s"${node.name} [${node.id}]$isCached\n${node.callsite}"
s"""${node.id} [label="${StringEscapeUtils.escapeJava(label)}"]"""
}