Repository: spark Updated Branches: refs/heads/branch-2.0 a719c5128 -> 646cc8552
[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 <[email protected]> Closes #15862 from srowen/SPARK-18382. (cherry picked from commit f95b124c68ccc2e318f6ac30685aa47770eea8f3) Signed-off-by: Kousuke Saruta <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/646cc855 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/646cc855 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/646cc855 Branch: refs/heads/branch-2.0 Commit: 646cc8552125a76cc1a0e108453e84672748f266 Parents: a719c51 Author: Sean Owen <[email protected]> Authored: Mon Nov 14 16:52:07 2016 +0900 Committer: Kousuke Saruta <[email protected]> Committed: Mon Nov 14 16:56: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/646cc855/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 b9cf721..40d7581 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -1426,8 +1426,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: [email protected] For additional commands, e-mail: [email protected]
