Skip to content

Commit ddefa44

Browse files
committed
[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 apache#275 from dongjoon-hyun/SPARK-52667. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent ad6ba0d commit ddefa44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/SparkAppReconciler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public DeleteControl cleanup(
183183
LoggingUtils.TrackedMDC trackedMDC = new LoggingUtils.TrackedMDC();
184184
try {
185185
trackedMDC.set(sparkApplication);
186-
log.info("Cleaning up resources for SparkApp.");
186+
log.info("Cleaning up resources for SparkApp:" + sparkApplication.getMetadata().getName());
187187
SparkAppContext ctx = new SparkAppContext(sparkApplication, context, submissionWorker);
188188
List<AppReconcileStep> cleanupSteps = new ArrayList<>();
189189
cleanupSteps.add(new AppValidateStep());
@@ -200,7 +200,7 @@ public DeleteControl cleanup(
200200
}
201201
}
202202
} finally {
203-
log.info("Cleanup completed");
203+
log.debug("Cleanup completed");
204204
trackedMDC.reset();
205205
}
206206
sparkAppStatusRecorder.removeCachedStatus(sparkApplication);

0 commit comments

Comments
 (0)