Skip to content
Closed
Changes from 1 commit
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 @@ -21,6 +21,7 @@ import java.util.Date
import javax.ws.rs._
import javax.ws.rs.core.MediaType

import scala.collection.immutable.HashMap
import scala.util.{Failure, Success, Try}

import org.apache.spark.JobExecutionStatus
Expand Down Expand Up @@ -94,7 +95,15 @@ private[v1] class SqlResource extends BaseAppResource {

val duration = exec.completionTime.getOrElse(new Date()).getTime - exec.submissionTime
val planDetails = if (planDescription) exec.physicalPlanDescription else ""
val nodes = if (details) printableMetrics(graph.allNodes, exec.metricValues) else Seq.empty
Comment thread
yimin-yang marked this conversation as resolved.
val nodes = if (details) {
if (exec.metricValues != null) {
printableMetrics(graph.allNodes, exec.metricValues)
} else {
printableMetrics(graph.allNodes, new HashMap[Long, String])
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option(exec.metricValues).getOrElse(Map()) instead

} else {
Seq.empty
}
val edges = if (details) graph.edges else Seq.empty

new ExecutionData(
Expand Down