Repository: spark
Updated Branches:
  refs/heads/branch-2.1 8fc6455c0 -> 12bde11ca


[SPARK-18382][WEBUI] "run at null:-1" in UI when no file/line info in call site 
info

## What changes were proposed in this pull request?

Avoid reporting null/-1 file / line number in call sites if encountering 
StackTraceElement without this info

## How was this patch tested?

Existing tests

Author: Sean Owen <so...@cloudera.com>

Closes #15862 from srowen/SPARK-18382.

(cherry picked from commit f95b124c68ccc2e318f6ac30685aa47770eea8f3)
Signed-off-by: Kousuke Saruta <saru...@oss.nttdata.co.jp>


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

Branch: refs/heads/branch-2.1
Commit: 12bde11ca0613dbd7d917c81a8b480d5a9355da5
Parents: 8fc6455
Author: Sean Owen <so...@cloudera.com>
Authored: Mon Nov 14 16:52:07 2016 +0900
Committer: Kousuke Saruta <saru...@oss.nttdata.co.jp>
Committed: Mon Nov 14 16:53:11 2016 +0900

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/util/Utils.scala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/12bde11c/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala 
b/core/src/main/scala/org/apache/spark/util/Utils.scala
index 892e112..a2386d6 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -1419,8 +1419,12 @@ private[spark] object Utils extends Logging {
             }
             callStack(0) = ste.toString // Put last Spark method on top of the 
stack trace.
           } else {
-            firstUserLine = ste.getLineNumber
-            firstUserFile = ste.getFileName
+            if (ste.getFileName != null) {
+              firstUserFile = ste.getFileName
+              if (ste.getLineNumber >= 0) {
+                firstUserLine = ste.getLineNumber
+              }
+            }
             callStack += ste.toString
             insideSpark = false
           }


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

Reply via email to