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

    https://github.com/apache/spark/pull/7602#discussion_r35559955
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala ---
    @@ -181,17 +181,26 @@ 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("  ")))
    +      }
    +      subgraph.append(indent).append("}\n")
    +      subgraph.toString()
    +    } catch {
    +      case oom: OutOfMemoryError =>
    --- End diff --
    
    I still don't think that we should be catching `OutOfMemoryError` here, 
especially if we're just going to re-throw it; it would be better to just let 
it propagate.


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