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

    https://github.com/apache/spark/pull/14737#discussion_r75593902
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala ---
    @@ -119,18 +119,47 @@ private[ui] object RDDOperationGraph extends Logging {
           { if (stage.attemptId == 0) "" else s" (attempt ${stage.attemptId})" 
}
         val rootCluster = new RDDOperationCluster(stageClusterId, 
stageClusterName)
     
    +    var rootNodeCount = 0
    +    val addRDDIds = new mutable.HashSet[Int]()
    +    val dropRDDIds = new mutable.HashSet[Int]()
    +
    +    def isAllowed(ids: mutable.HashSet[Int], rdd: RDDInfo): Boolean = {
    +      val parentIds = rdd.parentIds
    +      if (parentIds.size == 0) {
    +        rootNodeCount < retainedNodes
    +      } else {
    +        if (ids.size > 0) {
    +            parentIds.exists(id => ids.contains(id) || 
!dropRDDIds.contains(id))
    +        } else {
    +            true
    +        }
    +      }
    +    }
    +
         // Find nodes, edges, and operation scopes that belong to this stage
    -    stage.rddInfos.foreach { rdd =>
    -      edges ++= rdd.parentIds.map { parentId => RDDOperationEdge(parentId, 
rdd.id) }
    +    stage.rddInfos.sortBy(_.id).foreach { rdd =>
    +      val keepNode: Boolean = isAllowed(addRDDIds, rdd)
    --- End diff --
    
    OK.


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