Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7602#discussion_r35560427
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala ---
    @@ -181,17 +181,27 @@ private[ui] object RDDOperationGraph extends Logging {
       }
     
       /** Return the dot representation of a subgraph in an RDDOperationGraph. 
*/
    -  private def makeDotSubgraph(cluster: RDDOperationCluster, indent: 
String): String = {
    +  private def makeDotSubgraph(cluster: RDDOperationCluster, indent: 
StringBuilder): String = {
         val subgraph = new StringBuilder
    -    subgraph.append(indent + s"subgraph cluster${cluster.id} {\n")
    -    subgraph.append(indent + s"""  label="${cluster.name}";\n""")
    -    cluster.childNodes.foreach { node =>
    -      subgraph.append(indent + s"  ${makeDotNode(node)};\n")
    -    }
    -    cluster.childClusters.foreach { cscope =>
    -      subgraph.append(makeDotSubgraph(cscope, indent + "  "))
    +    try {
    +      subgraph.append(indent).append(s"subgraph cluster${cluster.id} {\n")
    +      subgraph.append(indent).append(s"""  label="${cluster.name}";\n""")
    +      cluster.childNodes.foreach { node =>
    +        subgraph.append(indent).append(s"  ${makeDotNode(node)};\n")
    +      }
    +      cluster.childClusters.foreach { cscope =>
    +        subgraph.append(makeDotSubgraph(cscope, indent.append("  ")))
    --- End diff --
    
    The StringBuilder is mutable, so won't this end up increasing the indent 
for each child cluster?


---
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]

Reply via email to