gengliangwang commented on code in PR #39226:
URL: https://github.com/apache/spark/pull/39226#discussion_r1059204601


##########
core/src/main/scala/org/apache/spark/status/AppStatusStore.scala:
##########
@@ -733,6 +734,15 @@ private[spark] class AppStatusStore(
 
   def close(): Unit = {
     store.close()
+    cleanUpStorePath()
+  }
+
+  private def cleanUpStorePath(): Unit = {
+    storePath.foreach { p =>
+      if (p.exists()) {
+        p.listFiles().foreach(Utils.deleteRecursively)
+      }
+    }

Review Comment:
   > Is there a reason to expose the ability to configure this path ?
   
   Do you mean the RocksDB file path? The size can be big if a user increases 
the retention limits. Thus a user should be able to choose the file path for 
it, instead of automatically choosing a temp dir. 
   If there is a corrupted RocksDB file during startup, shall we just remove 
them and try creating the RocksDB file again? There is such code path: 
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/status/KVUtils.scala#L155



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to