Skip to content

Commit 8a9916e

Browse files
committed
Replace details with stage name
1 parent 1ca4fa6 commit 8a9916e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/src/main/scala/com/joom/spark/monitoring/Parts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ case class StageSummary(
3939
peakExecutionMemoryGB: Double,
4040
properties: Map[String, String],
4141
endTs: Long,
42-
details: Option[String],
42+
name: Option[String],
4343
)
4444

4545
case class ExecutorMetric(

lib/src/main/scala/com/joom/spark/monitoring/StatsReportingSparkListener.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class StatsReportingSparkListener(sparkConf: SparkConf, apiKey: String,
4848
var startedTaskCount: Int = 0,
4949
var failureReason: Option[String] = None,
5050
var properties: Map[String, String] = Map(),
51-
var details: Option[String] = None)
51+
var name: Option[String] = None)
5252
private val tasksPerStage = mutable.Map[StageFullId, mutable.ArrayBuffer[(TaskMetrics, TaskEndReason)]]()
5353
private val stageState = mutable.Map[StageFullId, StageState]()
5454
private val appStart: Instant = Instant.now()
@@ -158,7 +158,7 @@ class StatsReportingSparkListener(sparkConf: SparkConf, apiKey: String,
158158
val startTime = stageSubmitted.stageInfo.submissionTime.map(Instant.ofEpochMilli).getOrElse(Instant.now())
159159
val state = stageState.getOrElseUpdate(stageFullId, StageState(startTime))
160160
state.properties = properties
161-
state.details = Some(stageSubmitted.stageInfo.details)
161+
state.name = Some(stageSubmitted.stageInfo.name)
162162
}
163163

164164
override def onStageCompleted(stageCompleted: SparkListenerStageCompleted): Unit = {
@@ -239,7 +239,7 @@ class StatsReportingSparkListener(sparkConf: SparkConf, apiKey: String,
239239
val failureReason = state.failureReason
240240
val startTime = state.startTime
241241
val summary = summarizeStage(appId, stageFullId.stageId, stageFullId.attemptNumber, success, failureReason,
242-
startTime, tasks.toSeq, state.properties, endTs, state.details)
242+
startTime, tasks.toSeq, state.properties, endTs, state.name)
243243

244244
implicit val codec: JsonValueCodec[StageSummary] = JsonCodecMaker.make
245245
send("stages", summary.get)
@@ -346,7 +346,7 @@ object StatsReportingSparkListener {
346346
rawTaskMetrics: Seq[(TaskMetrics, TaskEndReason)],
347347
properties: Map[String, String],
348348
endTime: Option[Long],
349-
details: Option[String],
349+
name: Option[String],
350350
): Option[StageSummary] = {
351351
val taskMetrics = rawTaskMetrics.map(_._1)
352352
.filter(_ != null) // For failed tasks, there will be 'null' TaskMetrics instances.
@@ -385,7 +385,7 @@ object StatsReportingSparkListener {
385385
peakExecutionMemoryGB = taskMetrics.map(_.peakExecutionMemory).sum / GiB,
386386
properties = properties,
387387
endTs = endTs,
388-
details = details,
388+
name = name,
389389
))
390390
}
391391
}

0 commit comments

Comments
 (0)