aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKousuke Saruta <sarutak@oss.nttdata.co.jp>2016-05-10 22:32:38 -0700
committerReynold Xin <rxin@databricks.com>2016-05-10 22:32:38 -0700
commitba181c0c7a32b0e81bbcdbe5eed94fc97b58c83e (patch)
tree5af77fffb80b84085d812096ab9090e18b5f5e18 /core
parent9f0a642f842df4d46f809c83df5e8b1803ab89a2 (diff)
downloadspark-ba181c0c7a32b0e81bbcdbe5eed94fc97b58c83e.tar.gz
spark-ba181c0c7a32b0e81bbcdbe5eed94fc97b58c83e.tar.bz2
spark-ba181c0c7a32b0e81bbcdbe5eed94fc97b58c83e.zip
[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 <sarutak@oss.nttdata.co.jp> Closes #13016 from sarutak/SPARK-15235.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/timeline-view.js4
1 files changed, 2 insertions, 2 deletions
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 f4453c71df..f1beca29c2 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];
};