This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new ddefa44  [SPARK-52667] Improve `SparkAppReconciler` to show app names 
during cleaning up
ddefa44 is described below

commit ddefa44b47c93f484df970043bb6059a867aa841
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Jul 2 23:44:47 2025 -0700

    [SPARK-52667] Improve `SparkAppReconciler` to show app names during 
cleaning up
    
    ### What changes were proposed in this pull request?
    
    This PR aims to improve `SparkAppReconciler` to show app names during 
cleaning up.
    
    ### Why are the changes needed?
    
    **BEFORE**
    
    The log message doesn't provide any specific information.
    
    ```
    25/07/03 05:54:22 INFO SparkAppReconciler: Cleaning up resources for 
SparkApp.
    25/07/03 05:54:22 INFO SparkAppReconciler: Cleanup completed
    25/07/03 05:54:22 INFO SparkAppReconciler: Cleaning up resources for 
SparkApp.
    25/07/03 05:54:22 INFO SparkAppReconciler: Cleanup completed
    ```
    
    **AFTER**
    
    It provides a concise and specific information.
    
    ```
    25/07/03 06:06:57 INFO SparkAppReconciler: Cleaning up resources for 
SparkApp:pi
    25/07/03 06:07:02 INFO SparkAppReconciler: Cleaning up resources for 
SparkApp:pi-java21
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No behavior change. This is only changing log message information.
    
    ### How was this patch tested?
    
    Manual build, install, test, and check logs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #275 from dongjoon-hyun/SPARK-52667.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../org/apache/spark/k8s/operator/reconciler/SparkAppReconciler.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/SparkAppReconciler.java
 
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/SparkAppReconciler.java
index c3b42e7..bae0e5b 100644
--- 
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/SparkAppReconciler.java
+++ 
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/SparkAppReconciler.java
@@ -183,7 +183,7 @@ public class SparkAppReconciler implements 
Reconciler<SparkApplication>, Cleaner
     LoggingUtils.TrackedMDC trackedMDC = new LoggingUtils.TrackedMDC();
     try {
       trackedMDC.set(sparkApplication);
-      log.info("Cleaning up resources for SparkApp.");
+      log.info("Cleaning up resources for SparkApp:" + 
sparkApplication.getMetadata().getName());
       SparkAppContext ctx = new SparkAppContext(sparkApplication, context, 
submissionWorker);
       List<AppReconcileStep> cleanupSteps = new ArrayList<>();
       cleanupSteps.add(new AppValidateStep());
@@ -200,7 +200,7 @@ public class SparkAppReconciler implements 
Reconciler<SparkApplication>, Cleaner
         }
       }
     } finally {
-      log.info("Cleanup completed");
+      log.debug("Cleanup completed");
       trackedMDC.reset();
     }
     sparkAppStatusRecorder.removeCachedStatus(sparkApplication);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to