From ca36ac360a48a242f9dacd85f8c094717243d66c Mon Sep 17 00:00:00 2001 From: Gera Shegalov Date: Mon, 22 Jan 2024 15:38:50 -0800 Subject: [PATCH] Disregard task killed, use toErrorStting for diagnostics Signed-off-by: Gera Shegalov --- .../nvidia/spark/rapids/listener/TaskFailureListener.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nds/jvm_listener/src/main/scala/com/nvidia/spark/rapids/listener/TaskFailureListener.scala b/nds/jvm_listener/src/main/scala/com/nvidia/spark/rapids/listener/TaskFailureListener.scala index e8e325d..2b23c1d 100644 --- a/nds/jvm_listener/src/main/scala/com/nvidia/spark/rapids/listener/TaskFailureListener.scala +++ b/nds/jvm_listener/src/main/scala/com/nvidia/spark/rapids/listener/TaskFailureListener.scala @@ -1,6 +1,6 @@ package com.nvidia.spark.rapids.listener -import org.apache.spark.{Success, TaskEndReason} +import org.apache.spark.{Success, TaskEndReason, TaskFailedReason, TaskKilled} import org.apache.spark.scheduler.{SparkListener, SparkListenerTaskEnd} import scala.collection.mutable.ListBuffer @@ -12,8 +12,9 @@ import scala.collection.mutable.ListBuffer class TaskFailureListener extends SparkListener { override def onTaskEnd(taskEnd: SparkListenerTaskEnd) { taskEnd.reason match { - case Success => - case reason => Manager.notifyAll(reason.toString) + case Success => () + case _: TaskKilled => () + case failedReason: TaskFailedReason => Manager.notifyAll(failedReason.toErrorString) } super.onTaskEnd(taskEnd) }