Skip to content

Commit 485ea08

Browse files
Andrew Ornemccarthy
authored andcommitted
[SPARK-7466] DAG visualization: fix orphan nodes
Simple fix. We were comparing an option with `null`. Before: <img src="https://issues.apache.org/jira/secure/attachment/12731383/before.png" width="250px"/> After: <img src="https://issues.apache.org/jira/secure/attachment/12731384/after.png" width="250px"/> Author: Andrew Or <[email protected]> Closes apache#6002 from andrewor14/dag-viz-orphan-nodes and squashes the following commits: a1468dc [Andrew Or] Fix null check
1 parent 8ee635b commit 485ea08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private[ui] object RDDOperationGraph extends Logging {
101101
val node = nodes.getOrElseUpdate(
102102
rdd.id, RDDOperationNode(rdd.id, rdd.name, rdd.storageLevel != StorageLevel.NONE))
103103

104-
if (rdd.scope == null) {
104+
if (rdd.scope.isEmpty) {
105105
// This RDD has no encompassing scope, so we put it directly in the root cluster
106106
// This should happen only if an RDD is instantiated outside of a public RDD API
107107
rootCluster.attachChildNode(node)

0 commit comments

Comments
 (0)