jerryshao commented on code in PR #7936:
URL: https://github.com/apache/gravitino/pull/7936#discussion_r2254246942


##########
core/src/main/java/org/apache/gravitino/job/JobManager.java:
##########
@@ -103,6 +127,32 @@ public JobManager(Config config, EntityStore entityStore, 
IdGenerator idGenerato
             String.format("Failed to create staging directory %s", 
stagingDirPath));
       }
     }
+
+    this.jobStagingDirKeepTimeInMs = 
config.get(Configs.JOB_STAGING_DIR_KEEP_TIME_IN_MS);
+    this.cleanUpExecutor =
+        Executors.newSingleThreadScheduledExecutor(
+            runnable -> {
+              Thread thread = new Thread(runnable, "job-staging-dir-cleanup");
+              thread.setDaemon(true);
+              return thread;
+            });
+    long scheduleInterval = jobStagingDirKeepTimeInMs / 10;

Review Comment:
   OK, I will, normally this should not be happened.



-- 
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]

Reply via email to