From c118f47b1676ded65a036110b715e40a7ef9c696 Mon Sep 17 00:00:00 2001 From: Andrew Ash Date: Mon, 6 Mar 2017 12:00:06 -0800 Subject: [PATCH] Logging for resource deletion (#170) * Logging for resource deletion Remove dangling colon and replace with an ellipses and a second log statement * Update KubernetesResourceCleaner.scala --- .../spark/deploy/kubernetes/KubernetesResourceCleaner.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/kubernetes/KubernetesResourceCleaner.scala b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/kubernetes/KubernetesResourceCleaner.scala index 6360bc0e48948..6329bb1359516 100644 --- a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/kubernetes/KubernetesResourceCleaner.scala +++ b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/kubernetes/KubernetesResourceCleaner.scala @@ -39,13 +39,15 @@ private[spark] class KubernetesResourceCleaner extends Logging { def deleteAllRegisteredResourcesFromKubernetes(kubernetesClient: KubernetesClient): Unit = { synchronized { - logInfo(s"Deleting ${resources.size} registered Kubernetes resources:") + val resourceCount = resources.size + logInfo(s"Deleting ${resourceCount} registered Kubernetes resources...") resources.values.foreach { resource => Utils.tryLogNonFatalError { kubernetesClient.resource(resource).delete() } } resources.clear() + logInfo(s"Deleted ${resourceCount} registered Kubernetes resources.") } } }