[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
(cherry picked from commit 3b0c5e71f1
)
Signed-off-by: Andrew Or <andrew@databricks.com>
This commit is contained in:
parent
f734c5895c
commit
ca2f1c56c6
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue