Skip to content

Commit

Permalink
check same group
Browse files Browse the repository at this point in the history
  • Loading branch information
XorSum committed Mar 1, 2024
1 parent d9efa2d commit 8028005
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -149,14 +149,6 @@ class SQLOperationListener(
val stageInfo = stageCompleted.stageInfo
val stageId = stageInfo.stageId
val stageAttempt = SparkStageAttempt(stageInfo.stageId, stageInfo.attemptNumber())
val taskMetrics = stageInfo.taskMetrics
if (taskMetrics != null) {
info(s"stageId=${stageCompleted.stageInfo.stageId}, " +
s"stageRunTime=${formatDuration(taskMetrics.executorRunTime)}, " +
s"stageCpuTime=${formatDuration(taskMetrics.executorCpuTime / 1000000)}")
operationRunTime.getAndAdd(taskMetrics.executorRunTime)
operationCpuTime.getAndAdd(taskMetrics.executorCpuTime)
}
activeStages.synchronized {
if (activeStages.remove(stageAttempt) != null) {
stageInfo.getStatusString match {
Expand All @@ -167,6 +159,14 @@ class SQLOperationListener(
}
}
}
val taskMetrics = stageInfo.taskMetrics
if (taskMetrics != null) {
info(s"stageId=${stageCompleted.stageInfo.stageId}, " +
s"stageRunTime=${formatDuration(taskMetrics.executorRunTime)}, " +
s"stageCpuTime=${formatDuration(taskMetrics.executorCpuTime / 1000000)}")
operationRunTime.getAndAdd(taskMetrics.executorRunTime)
operationCpuTime.getAndAdd(taskMetrics.executorCpuTime)
}
withOperationLog(super.onStageCompleted(stageCompleted))
}
}
Expand Down

0 comments on commit 8028005

Please sign in to comment.