bowenliang123 commented on code in PR #6335:
URL: https://github.com/apache/kyuubi/pull/6335#discussion_r1706191912


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -395,11 +395,7 @@ class BatchJobSubmission(
 
   private def cleanupUploadedResourceIfNeeded(): Unit = {
     if (session.isResourceUploaded) {
-      try {
-        Files.deleteIfExists(Paths.get(resource))
-      } catch {
-        case e: Throwable => error(s"Error deleting the uploaded resource: 
$resource", e)
-      }
+      FileUtils.deleteQuietly(session.resourceUploadFolderPath.toFile)

Review Comment:
   OK, changed to use `org.apache.kyuubi.Utils.deleteDirectoryRecursively`. And 
it's made sure it won't break on exceptions and continue to delete the whole 
folder.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to