Repository: spark Updated Branches: refs/heads/master 9f0a642f8 -> ba181c0c7
[SPARK-15235][WEBUI] Corresponding row cannot be highlighted even though cursor is on the job on Web UI's timeline ## What changes were proposed in this pull request? To extract job descriptions and stage name, there are following regular expressions in timeline-view.js ``` var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text(); var jobId = jobIdText.match("\\(Job (\\d+)\\)")[1]; ... var stageIdText = $($(baseElem).find(".job-timeline-content")[0]).text(); var stageIdAndAttempt = stageIdText.match("\\(Stage (\\d+\\.\\d+)\\)")[1].split("."); ``` But if job descriptions include patterns like "(Job x)" or stage names include patterns like "(Stage x.y)", the regular expressions cannot be match as we expected, ending up with corresponding row cannot be highlighted even though we move the cursor onto the job on Web UI's timeline. ## How was this patch tested? Manually tested with spark-shell and Web UI. Author: Kousuke Saruta <saru...@oss.nttdata.co.jp> Closes #13016 from sarutak/SPARK-15235. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ba181c0c Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ba181c0c Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ba181c0c Branch: refs/heads/master Commit: ba181c0c7a32b0e81bbcdbe5eed94fc97b58c83e Parents: 9f0a642 Author: Kousuke Saruta <saru...@oss.nttdata.co.jp> Authored: Tue May 10 22:32:38 2016 -0700 Committer: Reynold Xin <r...@databricks.com> Committed: Tue May 10 22:32:38 2016 -0700 ---------------------------------------------------------------------- .../main/resources/org/apache/spark/ui/static/timeline-view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/ba181c0c/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js ---------------------------------------------------------------------- diff --git a/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js b/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js index f4453c7..f1beca2 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js +++ b/core/src/main/resources/org/apache/spark/ui/static/timeline-view.js @@ -41,7 +41,7 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime) { $(".item.range.job.application-timeline-object").each(function() { var getSelectorForJobEntry = function(baseElem) { var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text(); - var jobId = jobIdText.match("\\(Job (\\d+)\\)")[1]; + var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1]; return "#job-" + jobId; }; @@ -113,7 +113,7 @@ function drawJobTimeline(groupArray, eventObjArray, startTime) { $(".item.range.stage.job-timeline-object").each(function() { var getSelectorForStageEntry = function(baseElem) { var stageIdText = $($(baseElem).find(".job-timeline-content")[0]).text(); - var stageIdAndAttempt = stageIdText.match("\\(Stage (\\d+\\.\\d+)\\)")[1].split("."); + var stageIdAndAttempt = stageIdText.match("\\(Stage (\\d+\\.\\d+)\\)$")[1].split("."); return "#stage-" + stageIdAndAttempt[0] + "-" + stageIdAndAttempt[1]; }; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org