Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ function renderDagVizForJob(svgContainer) {
});
});

addTooltipsForRDDs(svgContainer);
drawCrossStageEdges(crossStageEdges, svgContainer);
}

Expand Down Expand Up @@ -424,6 +425,21 @@ function connectRDDs(fromRDDId, toRDDId, edgesContainer, svgContainer) {
edgesContainer.append("path").datum(points).attr("d", line);
}

/* (Job page only) Helper function to add tooltips for RDDs. */
function addTooltipsForRDDs(svgContainer) {
svgContainer.selectAll("g.node").each(function() {
var node = d3.select(this);
var tooltipText = node.attr("name");
if (tooltipText) {
node.select("circle")
.attr("data-toggle", "tooltip")
.attr("data-placement", "right")
.attr("title", tooltipText)
}
});
$("[data-toggle=tooltip]").tooltip({container: "body"});
}

/* Helper function to convert attributes to numeric values. */
function toFloat(f) {
if (f) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ private[ui] object RDDOperationGraph extends Logging {
* On the stage page, it is displayed as a box with an embedded label.
*/
private def makeDotNode(node: RDDOperationNode, forJob: Boolean): String = {
val label = s"${node.name} (${node.id})"
if (forJob) {
s"""${node.id} [label=" " shape="circle" padding="5" labelStyle="font-size: 0"]"""
s"""${node.id} [label="$label" shape="circle" padding="5" labelStyle="font-size: 0"]"""
} else {
s"""${node.id} [label="${node.name} (${node.id})" padding="5" labelStyle="font-size: 10"]"""
s"""${node.id} [label="$label" padding="5" labelStyle="font-size: 10"]"""
}
}

Expand Down