vanzin commented on a change in pull request #25648: [SPARK-28947][K8S] Status
logging not happens at an interval for liveness
URL: https://github.com/apache/spark/pull/25648#discussion_r334634310
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/LoggingPodStatusWatcher.scala
##########
@@ -91,14 +74,21 @@ private[k8s] class LoggingPodStatusWatcherImpl(
}
private def closeWatch(): Unit = {
- podCompletedFuture.countDown()
- scheduler.shutdown()
+ podCompleted = true
}
- override def awaitCompletion(): Unit = {
- podCompletedFuture.await()
- logInfo(pod.map { p =>
- s"Container final statuses:\n\n${containersDescription(p)}"
- }.getOrElse("No containers were found in the driver pod."))
+ override def watchOrStop(sId: String): Unit = if
(conf.get(WAIT_FOR_APP_COMPLETION)) {
+ logInfo(s"Waiting for application ${conf.appName} with submission ID $sId
to finish...")
+ val interval = conf.get(REPORT_INTERVAL)
+ while (!podCompleted) {
+ Thread.sleep(interval)
Review comment:
Instead of this you should be using something like `wait`/`notifyAll` so you
can actually wakeup this thread when needed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]