You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2015/05/08 23:09:45 UTC

spark git commit: [SPARK-7466] DAG visualization: fix orphan nodes

Repository: spark
Updated Branches:
  refs/heads/master 31da40dfe -> 3b0c5e71f


[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 <an...@databricks.com>

Closes #6002 from andrewor14/dag-viz-orphan-nodes and squashes the following commits:

a1468dc [Andrew Or] Fix null check


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3b0c5e71
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3b0c5e71
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3b0c5e71

Branch: refs/heads/master
Commit: 3b0c5e71f156516fd8bbbeda70e69b487b0c1418
Parents: 31da40d
Author: Andrew Or <an...@databricks.com>
Authored: Fri May 8 14:09:39 2015 -0700
Committer: Andrew Or <an...@databricks.com>
Committed: Fri May 8 14:09:39 2015 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/3b0c5e71/core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala
----------------------------------------------------------------------
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 c7045c9..b470aaa 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)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org