grarkydev commented on a change in pull request #32289:
URL: https://github.com/apache/spark/pull/32289#discussion_r675464560
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/PodStatusWatcher.scala
##########
@@ -82,11 +94,29 @@ private[k8s] class LoggingPodStatusWatcherImpl(conf:
KubernetesDriverConf)
closeWatch()
}
+ private def notifyStatusChanged(): Unit = {
+ if (phase != latestPhase) {
+ latestPhase = phase
+ latestPhase match {
+ case "Pending" => reportStatusChanged(SparkAppHandle.State.SUBMITTED)
+ case "Running" => reportStatusChanged(SparkAppHandle.State.RUNNING)
+ case "Succeeded" => reportStatusChanged(SparkAppHandle.State.FINISHED)
+ case "Failed" => reportStatusChanged(SparkAppHandle.State.FAILED)
+ case "Unknown" => reportStatusChanged(SparkAppHandle.State.LOST)
+ case _ => reportStatusChanged(SparkAppHandle.State.UNKNOWN)
Review comment:
Good catch, changed
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/PodStatusWatcher.scala
##########
@@ -82,11 +94,29 @@ private[k8s] class LoggingPodStatusWatcherImpl(conf:
KubernetesDriverConf)
closeWatch()
}
+ private def notifyStatusChanged(): Unit = {
+ if (phase != latestPhase) {
+ latestPhase = phase
+ latestPhase match {
+ case "Pending" => reportStatusChanged(SparkAppHandle.State.SUBMITTED)
+ case "Running" => reportStatusChanged(SparkAppHandle.State.RUNNING)
+ case "Succeeded" => reportStatusChanged(SparkAppHandle.State.FINISHED)
+ case "Failed" => reportStatusChanged(SparkAppHandle.State.FAILED)
+ case "Unknown" => reportStatusChanged(SparkAppHandle.State.LOST)
+ case _ => reportStatusChanged(SparkAppHandle.State.UNKNOWN)
Review comment:
Good catch, changed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]