[Java] Automatically clean up temp files.#5507
[Java] Automatically clean up temp files.#5507jovany-wang merged 8 commits intoray-project:masterfrom
Conversation
| return false; | ||
| @Override | ||
| public void close() { | ||
| Preconditions.checkState(file.delete(), "Couldn't delete file {}", file.getAbsolutePath()); |
There was a problem hiding this comment.
I prefer a warning message instead of a check here.
| startProcess(command, null, "raylet"); | ||
| try (FileUtil.TempFile rayletFile = FileUtil.getTempFileFromResource("raylet")) { | ||
| rayletFile.getFile().setExecutable(true); | ||
| List<String> command = ImmutableList.of( |
There was a problem hiding this comment.
I'm surprised that CI isn't able to catch this!
|
Test PASSed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
This reverts commit fab5ae6.
Why are these changes needed?
Previously, we depends on
File::deleteOnExitto delete temp files. This way sometimes cannot work if the JVM doesn't exit gracefully. This issue may lead to eating up disk space.What do these changes do?
Related issue number
Linter
scripts/format.shto lint the changes in this PR.