Skip to content

Commit ba181c0

Browse files
sarutakrxin
authored andcommitted
[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 <[email protected]> Closes #13016 from sarutak/SPARK-15235.
1 parent 9f0a642 commit ba181c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/resources/org/apache/spark/ui/static/timeline-view.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function drawApplicationTimeline(groupArray, eventObjArray, startTime) {
4141
$(".item.range.job.application-timeline-object").each(function() {
4242
var getSelectorForJobEntry = function(baseElem) {
4343
var jobIdText = $($(baseElem).find(".application-timeline-content")[0]).text();
44-
var jobId = jobIdText.match("\\(Job (\\d+)\\)")[1];
44+
var jobId = jobIdText.match("\\(Job (\\d+)\\)$")[1];
4545
return "#job-" + jobId;
4646
};
4747

@@ -113,7 +113,7 @@ function drawJobTimeline(groupArray, eventObjArray, startTime) {
113113
$(".item.range.stage.job-timeline-object").each(function() {
114114
var getSelectorForStageEntry = function(baseElem) {
115115
var stageIdText = $($(baseElem).find(".job-timeline-content")[0]).text();
116-
var stageIdAndAttempt = stageIdText.match("\\(Stage (\\d+\\.\\d+)\\)")[1].split(".");
116+
var stageIdAndAttempt = stageIdText.match("\\(Stage (\\d+\\.\\d+)\\)$")[1].split(".");
117117
return "#stage-" + stageIdAndAttempt[0] + "-" + stageIdAndAttempt[1];
118118
};
119119

0 commit comments

Comments
 (0)