diff options
author | Andrew Or <andrew@databricks.com> | 2015-05-08 14:09:39 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-05-08 14:09:39 -0700 |
commit | 3b0c5e71f156516fd8bbbeda70e69b487b0c1418 (patch) | |
tree | 8197aeff339debb92ac340c47318692b54b8ed51 /core/src | |
parent | 31da40dfeeeab69ee7974992328e3f67046ad3da (diff) | |
download | spark-3b0c5e71f156516fd8bbbeda70e69b487b0c1418.tar.gz spark-3b0c5e71f156516fd8bbbeda70e69b487b0c1418.tar.bz2 spark-3b0c5e71f156516fd8bbbeda70e69b487b0c1418.zip |
[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 <andrew@databricks.com>
Closes #6002 from andrewor14/dag-viz-orphan-nodes and squashes the following commits:
a1468dc [Andrew Or] Fix null check
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala b/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala index c7045c98c8..b470aaa676 100644 --- a/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala +++ b/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala @@ -101,7 +101,7 @@ private[ui] object RDDOperationGraph extends Logging { val node = nodes.getOrElseUpdate( rdd.id, RDDOperationNode(rdd.id, rdd.name, rdd.storageLevel != StorageLevel.NONE)) - if (rdd.scope == null) { + if (rdd.scope.isEmpty) { // This RDD has no encompassing scope, so we put it directly in the root cluster // This should happen only if an RDD is instantiated outside of a public RDD API rootCluster.attachChildNode(node) |