Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/5547#discussion_r28744020
--- Diff: core/src/main/resources/org/apache/spark/ui/static/jobs-graph.js
---
@@ -0,0 +1,118 @@
+function renderJobsGraphs(data) {
+ /* show visualization toggle */
+ $(".expand-visualization-arrow").toggleClass('arrow-closed');
+ $(".expand-visualization-arrow").toggleClass('arrow-open');
+ if ($(".expand-visualization-arrow").hasClass("arrow-closed")) {
+ $("#chartContainer").empty();
+ return;
+ }
+
+ /* no data to graph */
+ if (!Object.keys(data).length) {
+ return;
+ }
+
+ /* format data to a form readable by dimple.js */
+ var tableData = [];
+ for (var k in data) {
+ var arr = (data[k]).split(",");
+ data[k] = arr;
+ }
+ var startTime = getMin(data["launchtime"]);
+ var numTasks = Math.min(1000, data[k].length);
+
+ /*data update */
+ data["launchtime"] = data["launchtime"].map(function (launchTime)
{return launchTime-startTime;});
+ var maxTime = 0;
+ for (i = 0; i < numTasks; i++) {
+ var time = 0;
+ for (var key in data) {
+ time += parseFloat(data[key][i]);
--- End diff --
this might be pretty slow when there are thousands of tasks - if so,
sending proper double types in JSON would be faster.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]