sarutak commented on a change in pull request #27927: [SPARK-31081][UI][SQL] 
Make display of stageId/stageAttemptId/taskId of sql metrics toggleable
URL: https://github.com/apache/spark/pull/27927#discussion_r396060771
 
 

 ##########
 File path: 
sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
 ##########
 @@ -70,6 +71,10 @@ function setupTooltipForSparkPlanNode(nodeId) {
     })
 }
 
+// labelSeparator should be a non-graphical character in order not to affect 
the width of boxes.
+var labelSeparator = "\x01";
 
 Review comment:
   >  It seem that the label of cluster will contain the <span 
class='stageId-and-taskId-metrics'> as well
   
   Actually it's not. The following is a dot-notated cluster related to a DAG.
   ```
     subgraph cluster1 {
       isCluster=&quot;true&quot;;
       label=&quot;WholeStageCodegen (2)\n \nduration total (min, med, max 
(stageId (attemptId): taskId)): \n1.4 s (149 ms, 152 ms, 152 ms (stage 2 
(attempt 0): task 26))&quot;;
         2 [labelType=&quot;html&quot; 
label=&quot;&lt;br&gt;&lt;b&gt;Project&lt;/b&gt;&lt;br&gt;&lt;br&gt;&quot;];    
     3 [labelType=&quot;html&quot; 
label=&quot;&lt;b&gt;Sort&lt;/b&gt;&lt;br&gt;&lt;br&gt;sort time total (min, 
med, max (stageId (attemptId): taskId)): &lt;br&gt;3 ms (0 ms, 0 ms, 1 ms 
(stage 2 (attempt 0): task 27))&lt;br&gt;peak memory total (min, med, max 
(stageId (attemptId): taskId)): &lt;br&gt;18.6 MiB (2.1 MiB, 2.1 MiB, 2.1 MiB 
(stage 2 (attempt 0): task 26))&lt;br&gt;spill size total (min, med, max 
(stageId (attemptId): taskId)): &lt;br&gt;0.0 B (0.0 B, 0.0 B, 0.0 B (stage 2 
(attempt 0): task 26))&quot;];
     }
   ```
   
   The label type of cluster is not `html` so the label string can't contain 
html tags.
   I tried to make the label type `html` but I found that the DAG had broken 
layout.
   
   The width of boxes are determined based on the length of text by `dagre-d3`.
   So if the separator character has width (graphical), the width of boxes are 
slightly widened against the original texts.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to