Skip to content

Commit b9d8f1b

Browse files
committed
Fixed performance issue
Modified colors
1 parent ac8842b commit b9d8f1b

File tree

3 files changed

+169
-181
lines changed

3 files changed

+169
-181
lines changed

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,38 @@ div#application-timeline, div#job-timeline {
5050
}
5151

5252
rect.scheduler-delay-proportion {
53-
fill: #F6D76B;
53+
fill: #80B1D3;
54+
stroke: #6B94B0;
5455
}
5556

5657
rect.deserialization-time-proportion {
57-
fill: #FFBDD8;
58+
fill: #FB8072;
59+
stroke: #D26B5F;
5860
}
5961

6062
rect.shuffle-read-time-proportion {
61-
fill: #8AC7DE;
63+
fill: #FDB462;
64+
stroke: #D39651;
6265
}
6366

6467
rect.executor-runtime-proportion {
65-
fill: #D9EB52;
68+
fill: #B3DE69;
69+
stroke: #95B957;
6670
}
6771

6872
rect.shuffle-write-time-proportion {
69-
fill: #87796F;
73+
fill: #FFED6F;
74+
stroke: #D5C65C;
7075
}
7176

7277
rect.serialization-time-proportion {
73-
fill: #93DFB8;
78+
fill: #BC80BD;
79+
stroke: #9D6B9E;
7480
}
7581

7682
rect.getting-result-time-proportion {
77-
fill: #FF9036;
83+
fill: #8DD3C7;
84+
stroke: #75B0A6;
7885
}
7986

8087
.vis.timeline {

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

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -161,33 +161,6 @@ function drawTaskAssignmentTimeline(groupArray, eventObjArray, minLaunchTime, zo
161161
taskTimeline.setWindow(minLaunchTime, curEnd);
162162
setupZoomable('#task-assignment-timeline-zoom-lock', taskTimeline);
163163

164-
function setupTaskEventAction() {
165-
$(".item.range.task.task-assignment-timeline-object").each(function() {
166-
var getSelectorForTaskEntry = function(baseElem) {
167-
var taskIdxText = $(baseElem).find(".task-assignment-timeline-content").attr("data-title");
168-
var taskIdx = taskIdxText.match("Task (\\d+)\\(")[1];
169-
return "#task-" + taskIdx;
170-
};
171-
172-
$(this).hover(
173-
function() {
174-
$(getSelectorForTaskEntry(this)).addClass("corresponding-item-hover");
175-
$($(this).find("div.task-assignment-timeline-content")[0]).tooltip("show");
176-
},
177-
function() {
178-
$(getSelectorForTaskEntry(this)).removeClass("corresponding-item-hover");
179-
$($(this).find("div.task-assignment-timeline-content")[0])
180-
.tooltip("hide");
181-
}
182-
);
183-
});
184-
}
185-
186-
setupTaskEventAction();
187-
taskTimeline.on("rangechanged", function(properties) {
188-
setupTaskEventAction();
189-
});
190-
191164
$("span.expand-task-assignment-timeline").click(function() {
192165
$("#task-assignment-timeline").toggleClass('collapsed');
193166

@@ -197,6 +170,16 @@ function drawTaskAssignmentTimeline(groupArray, eventObjArray, minLaunchTime, zo
197170
});
198171
}
199172

173+
function setupTaskEventActionOnMouseOver(taskIdAndAttempt) {
174+
$("#task-" + taskIdAndAttempt).addClass("corresponding-item-hover");
175+
$("#task-event-" + taskIdAndAttempt).tooltip("show");
176+
}
177+
178+
function setupTaskEventActionOnMouseOut(taskIdAndAttempt) {
179+
$("#task-" + taskIdAndAttempt).removeClass("corresponding-item-hover");
180+
$("#task-" + taskIdAndAttempt).tooltip("hide");
181+
}
182+
200183
function setupExecutorEventAction() {
201184
$(".item.box.executor").each(function () {
202185
$(this).hover(
@@ -211,15 +194,15 @@ function setupExecutorEventAction() {
211194
}
212195

213196
function setupZoomable(id, timeline) {
214-
$(id + '>input[type="checkbox"]').click(function() {
197+
$(id + '> input[type="checkbox"]').click(function() {
215198
if (this.checked) {
216199
timeline.setOptions({zoomable: true});
217200
} else {
218201
timeline.setOptions({zoomable: false});
219202
}
220203
});
221204

222-
$(id + ">span").click(function() {
205+
$(id + "> span").click(function() {
223206
$(this).parent().find('input:checkbox').trigger('click');
224207
});
225208
}

0 commit comments

Comments
 (0)